Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

gros1944

@gros1944
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help: Object reference not set to an instance of an object.
    G gros1944

    Thank you very much!! I think I've found the problem, although is not about cf.buffCount. You're right, I'll encapsulate this function into another class, thank you very much! ;)

    C# csharp com sysadmin help

  • Help: Object reference not set to an instance of an object.
    G gros1944

    Here's part of my project: public class NetworkStats { private Form1 form; private AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer player; private ConfigResult cf; public NetworkStats(Form1 form1, AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer player1, ConfigResult cf1) { form = form1; player = player1; cf = cf1; } public FileStruct FileStats() { string path; DirectoryInfo dir; FileStruct fs = new FileStruct(); path = cf.pathLog + "\\" + player.currentMedia.name + "\\"; dir = new DirectoryInfo(cf.pathLog); dir.CreateSubdirectory(player.currentMedia.name); if(cf.buffCount) { try { fs.fileStats = new FileStream(path + "Stats.txt", FileMode.Create, FileAccess.Write); fs.swStats = new StreamWriter(fs.fileStats); } catch (Exception e) { Console.WriteLine(e.Message); } } if(cf.currBW) { try { fs.fileBW = new FileStream(path + "currBW.txt", FileMode.Create, FileAccess.Write); fs.swBW = new StreamWriter(fs.fileBW); } catch (Exception e) { Console.WriteLine(e.Message); } } if(cf.currBR) { try { fs.fileBR = new FileStream(path + "currBR.txt", FileMode.Create, FileAccess.Write); fs.swBR = new StreamWriter(fs.fileBR); } catch (Exception e) { Console.WriteLine(e.Message); } } if(cf.currFR) { try { fs.fileFR = new FileStream(path + "currFR.txt", FileMode.Create, FileAccess.Write); fs.swFR = new StreamWriter(fs.fileFR); } catch (Exception e) { Console.WriteLine(e.Message); } } return fs; } public void initStats() { FileStruct fs; fs = FileStats(); while (Form1.videoParat != true) { try { form.BitRate.Text = (player.network.bitRate).ToString() + " Bps"; if(cf.currBR) { fs.swBR.WriteLine(player.network.bitRate.ToString() + " " + player.controls.currentPositionString); } form.BW.Text = (player.network.bandWidth).ToString() + " Bps"; if(cf.currBW) { fs.swBW.WriteLine(player.network.bandWidth.ToString() + " " + player.controls.currentPositionString); } form.buffCount.Text = (player.network.bufferingCount).ToString(); form.buffProgress.Text = (player.network.bufferingProgress).ToString(); form.buffTime.Text = (player.network.bufferingTime).ToString() + " mseg"; form.downPr

    C# csharp com sysadmin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups