void Main_Load(object sender, EventArgs e) { Left = Screen.PrimaryScreen.WorkingArea.Width / 24; Top = Screen.PrimaryScreen.WorkingArea.Height / 16; pluginAssemblyFileName.Text = Properties.Settings.Default.PluginAssemblyFileName; backgroundTestImageFileName.Text = Properties.Settings.Default.BackgroundTestImageFileName; sampleSessionDataFileName.Text = Properties.Settings.Default.SampleSessionDataFileName; domainForm = DomainForm.CreateRemote(pluginAssemblyFileName.Text); domainForm.SetSessionDataFileName(sampleSessionDataFileName.Text); domainForm.SetOnError((s, m) => errorDetailsTextBox.Text = s + "\r\n" + m); domainForm.SetOnAnimationTick((d, f) => { playbackTimeLabel.Text = String.Format("Time: {0} over {1}", f, d); double percentage = f / d; if (!moving) { replayProgress.SplitterDistance = (int)(percentage * replayProgress.Width); } }); if (File.Exists(backgroundTestImageFileName.Text)) { domainForm.SetBackgroundImage(backgroundTestImageFileName.Text); domainForm.SetClientSize(new Size(1920 / 3, 1080 / 3)); domainForm.SetPosition(this.Left, this.Top + this.Height); } domainForm.SetFramesPerSecond((int)framesPerSecond.Value); domainForm.Activate(); RecreateWatcher(); }
void Main_Load(object sender, EventArgs e) { Left = Screen.PrimaryScreen.WorkingArea.Width / 24; Top = Screen.PrimaryScreen.WorkingArea.Height / 16; pluginAssemblyFileName.Text = Properties.Settings.Default.PluginAssemblyFileName; backgroundTestImageFileName.Text = Properties.Settings.Default.BackgroundTestImageFileName; sampleSessionDataFileName.Text = Properties.Settings.Default.SampleSessionDataFileName; domainForm = DomainForm.CreateRemote(pluginAssemblyFileName.Text); domainForm.SetSessionDataFileName(sampleSessionDataFileName.Text); domainForm.SetOnError((s, m) => errorDetailsTextBox.Text = s + "\r\n" + m); domainForm.SetOnAnimationTick((d, f) => { playbackTimeLabel.Text = String.Format("Time: {0} over {1}", f, d); double percentage = f / d; if (!moving) replayProgress.SplitterDistance = (int)(percentage * replayProgress.Width); }); if (File.Exists(backgroundTestImageFileName.Text)) { domainForm.SetBackgroundImage(backgroundTestImageFileName.Text); domainForm.SetClientSize(new Size(1920 / 3, 1080 / 3)); domainForm.SetPosition(this.Left, this.Top + this.Height); } domainForm.SetFramesPerSecond((int)framesPerSecond.Value); domainForm.Activate(); RecreateWatcher(); }