//End of the code for the window moving. /// <summary> /// Initial constructor. /// </summary> public FaceSplit() { InitializeComponent(); this.ConfigureFilesDialogs(); this.layoutSettings = new Model.LayoutSettings(); if (!Settings.Default.LayoutSettingsFile.Equals("")) { this.layoutSettings.File = Settings.Default.LayoutSettingsFile; } this.hotkeyBinder = new HotkeyBinder(); this.BindHotkeys(); this.globalHotkeysActive = true; segmentsRectangles = new List <Rectangle>(); watchRectangle = new Rectangle(ZERO, ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT); this.displayMode = DisplayMode.TIMER_ONLY; this.watchColor = Settings.Default.TimerNotRunningColor; this.segmentWatchColor = Settings.Default.SegmentTimerNotRunningColor; informations = new List <Information>(); this.splitY_start = 0; base.Paint += new PaintEventHandler(this.DrawFaceSplit); base.Size = new Size(DEFAULT_WIDTH, DEFAULT_HEIGHT); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); watch = new Stopwatch(); segmentWatch = new Stopwatch(); this.ticksTimer.Enabled = true; }
private void LoadLayoutFromFile(String file) { serializer = new XmlSerializer(layoutSettings.GetType()); layoutSettings = (Model.LayoutSettings)serializer.Deserialize(new StreamReader(file)); layoutSettings.LoadLayoutSettings(); layoutSettings.File = file; Settings.Default.Save(); }
//End of the code for the window moving. /// <summary> /// Initial constructor. /// </summary> public FaceSplit() { InitializeComponent(); this.ConfigureFilesDialogs(); this.layoutSettings = new Model.LayoutSettings(); if (!Settings.Default.LayoutSettingsFile.Equals("")) { this.layoutSettings.File = Settings.Default.LayoutSettingsFile; } this.hotkeyBinder = new HotkeyBinder(); this.BindHotkeys(); this.globalHotkeysActive = true; segmentsRectangles = new List<Rectangle>(); watchRectangle = new Rectangle(ZERO, ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT); this.displayMode = DisplayMode.TIMER_ONLY; this.watchColor = Settings.Default.TimerNotRunningColor; this.segmentWatchColor = Settings.Default.SegmentTimerNotRunningColor; informations = new List<Information>(); this.splitY_start = 0; base.Paint += new PaintEventHandler(this.DrawFaceSplit); base.Size = new Size(DEFAULT_WIDTH, DEFAULT_HEIGHT); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); watch = new Stopwatch(); segmentWatch = new Stopwatch(); this.ticksTimer.Enabled = true; }