Exemplo n.º 1
0
        public FormProperty(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.sumacon = sumacon;
            this.sumacon.DeviceManager.ActiveDeviceChanged += this.DeviceManager_ActiveDeviceChanged;
            this.sumacon.DeviceManager.PropertyChanged     += this.DeviceManager_PropertyChanged;
        }
Exemplo n.º 2
0
        public FormPerformance(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.sumacon = sumacon;
            this.sumacon.DeviceManager.ActiveDeviceChanged += this.DeviceManager_ActiveDeviceChanged;

            this.kCpuCellPaintColor = this.colorSet.Accent3;
        }
Exemplo n.º 3
0
        public FormLog(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.sumacon = sumacon;
            this.sumacon.DeviceManager.ActiveDeviceChanged += this.DeviceManager_ActiveDeviceChanged;

            this.SetupToolStrip();
            this.SetupLogGridPanel();
            this.SetupStatusStrip();
        }
Exemplo n.º 4
0
        public FormCapture(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.sumacon = sumacon;
            this.sumacon.DeviceManager.ActiveDeviceChanged += DeviceManager_ActiveDeviceChanged;

            this.SetupContextMenu();
            this.SetupPicturePreview();

            this.uxIntervalNumeric.Minimum = 1;
            this.uxCountNumeric.Minimum    = 1;

            this.uxContinuousCheck.CheckedChanged += (s, ee) => this.UpdateControlState();
            this.uxCountCheck.CheckedChanged      += (s, ee) => this.UpdateControlState();
            this.uxStartButton.Click += this.UxStartButton_Click;

            this.uxFileGridPanel      = new GridPanel();
            this.uxFileGridPanel.Dock = DockStyle.Fill;
            this.uxFileGridPanel.AutoGenerateColumns = false;
            this.uxFileGridPanel.DataSource          = this.capturedFileInfos;
            this.uxFileGridPanel.Columns.Add(
                this.CreateColumn(Properties.Resources.General_Name, nameof(FileInfo.Name), 240));
            this.uxFileGridPanel.Columns.Add(
                this.CreateColumn(Properties.Resources.General_Size, nameof(FileInfo.Length), 50, "#,##0 KB", DataGridViewContentAlignment.MiddleRight));
            this.uxFileGridPanel.Columns.Add(
                this.CreateColumn(Properties.Resources.General_DateTime, nameof(FileInfo.LastWriteTime), 120, "G"));
            this.uxFileGridPanel.CellFormatting += (s, e) =>
            {
                if (this.uxFileGridPanel.Columns[e.ColumnIndex].Name == Properties.Resources.General_Size)
                {
                    e.Value = (long)e.Value / 1024;
                }
            };
            foreach (DataGridViewColumn column in this.uxFileGridPanel.Columns)
            {
                column.SortMode = DataGridViewColumnSortMode.NotSortable;
            }
            this.uxFileGridPanel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            this.uxFileGridPanel.ContextMenuStrip    = this.fileGridContextMenu;
            this.uxFileGridPanel.SelectionChanged   += this.FileGridPanel_SelectionChanged;
            this.uxFileGridPanel.KeyDown            += this.UxFileGridPanel_KeyDown;
            this.uxFileGridPanel.CellDoubleClick    += (s, ee) => this.OpenSelectedFile();
            this.uxSplitContainer.Panel1.Controls.Add(this.uxFileGridPanel);

            this.uxToolTip.SetToolTip(this.uxPatternText, this.patternToolTipText);
            this.uxToolTip.AutoPopDelay = 30000;

            this.patternToolTipText = Properties.Resources.FileNamePatternHelp;
        }
Exemplo n.º 5
0
        public FormConsole(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.sumacon = sumacon;
            this.sumacon.WriteConsoleRequested             += this.Sumacon_WriteConsoleRequested;
            this.sumacon.DeviceManager.DeviceConnected     += this.DeviceManager_DeviceConnected;
            this.sumacon.DeviceManager.DeviceDisconnecting += this.DeviceManager_DeviceDisconnecting;

            this.uxInputCombo.KeyDown         += this.UxInputText_KeyDown;
            this.uxInputCombo.PreviewKeyDown  += this.UxInputCombo_PreviewKeyDown;
            this.uxInputCombo.AutoCompleteMode = AutoCompleteMode.Append;
        }
Exemplo n.º 6
0
        public FormScript(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.uxStopButton        = this.uxToolStrip.Items.Add("Stop", null, (s, ee) => this.OnStop()) as ToolStripButton;
            this.uxStopButton.Image  = this.imageList1.Images["control_stop_blue.png"];
            this.uxRunButton         = this.uxToolStrip.Items.Add("Run", null, (s, ee) => this.OnRun()) as ToolStripButton;
            this.uxRunButton.Image   = this.imageList1.Images["control_play_blue.png"];
            this.uxPauseButton       = this.uxToolStrip.Items.Add("Pause", null, (s, ee) => this.OnPause()) as ToolStripButton;
            this.uxPauseButton.Image = this.imageList1.Images["control_pause_blue.png"];
            this.uxStepButton        = this.uxToolStrip.Items.Add("Step", null, (s, ee) => this.OnStep()) as ToolStripButton;
            this.uxStepButton.Image  = this.imageList1.Images["control_step_blue.png"];

            this.sumacon = sumacon;
        }
Exemplo n.º 7
0
        public FormRecord(Sumacon sumacon)
        {
            Trace.TraceInformation(Util.GetCurrentMethodName());
            InitializeComponent();

            this.sumacon = sumacon;
            this.sumacon.DeviceManager.ActiveDeviceChanged += this.DeviceManager_ActiveDeviceChanged;

            this.SetupContextMenu();

            // viewSizeRadioMap, qualityRadioMapのキーはSettingの文字列と対応(ボタンのラベルじゃない)

            this.uxSize1.Checked  = true;
            this.viewSizeRadioMap = new Dictionary <string, RadioButton>()
            {
                { "1/1", this.uxSize1 }, { "1/2", this.uxSize2 }, { "1/4", this.uxSize4 }
            };
            foreach (var entry in this.viewSizeRadioMap)
            {
                entry.Value.Tag             = entry.Key;
                entry.Value.CheckedChanged += (s, e) => this.UpdateApproxSize();
            }

            this.uxQualityNormal.Checked = true;
            this.qualityRadioMap         = new Dictionary <string, RadioButton>()
            {
                { "Normal", this.uxQualityNormal }, { "Economy", this.uxQuarityEconomy }
            };
            foreach (var entry in this.qualityRadioMap)
            {
                entry.Value.Tag             = entry.Key;
                entry.Value.CheckedChanged += (s, e) => this.UpdateApproxSize();
            }

            this.uxLimitTimeNumeric.Minimum       = 1;
            this.uxLimitTimeNumeric.Maximum       = RecordContext.TimeLimitSecondsMax;
            this.uxLimitTimeNumeric.ValueChanged += (s, e) => this.UpdateApproxSize();

            this.timeButtons = new[] { this.uxLimitTime10, this.uxLimitTime30, this.uxLimitTime60, this.uxLimitTime180 };
            foreach (var button in this.timeButtons)
            {
                button.Click += this.UxLimitTime_Clicked;
            }

            this.uxStartButton.Click += this.UxStartButton_Click;

            this.uxFileGridPanel      = new GridPanel();
            this.uxFileGridPanel.Dock = DockStyle.Fill;
            this.uxFileGridPanel.AutoGenerateColumns = false;
            this.uxFileGridPanel.DataSource          = this.fileInfos;
            this.uxFileGridPanel.Columns.Add(
                this.CreateColumn(Properties.Resources.General_Name, nameof(FileInfo.Name), 240));
            this.uxFileGridPanel.Columns.Add(
                this.CreateColumn(Properties.Resources.General_Size, nameof(FileInfo.Length), 50, "#,##0 KB", DataGridViewContentAlignment.MiddleRight));
            this.uxFileGridPanel.Columns.Add(
                this.CreateColumn(Properties.Resources.General_DateTime, nameof(FileInfo.LastWriteTime), 120, "G"));
            this.uxFileGridPanel.CellFormatting += (s, e) =>
            {
                if (this.uxFileGridPanel.Columns[e.ColumnIndex].Name == Properties.Resources.General_Size)
                {
                    e.Value = (long)e.Value / 1024;
                }
            };
            foreach (DataGridViewColumn column in this.uxFileGridPanel.Columns)
            {
                column.SortMode = DataGridViewColumnSortMode.NotSortable;
            }
            this.uxFileGridPanel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            this.uxFileGridPanel.ContextMenuStrip    = this.fileGridContextMenu;
            this.uxFileGridPanel.SelectionChanged   += this.FileGridPanel_SelectionChanged;
            this.uxFileGridPanel.KeyDown            += this.UxFileGridPanel_KeyDown;
            this.uxFileGridPanel.CellDoubleClick    += (s, ee) => this.OpenSelectedFile();
            this.uxSplitContainer.Panel1.Controls.Add(this.uxFileGridPanel);

            // 経過時間の表示更新用
            this.elapsedTimeRedrawTimer.Interval = 1000;
            this.elapsedTimeRedrawTimer.Tick    += (s, e) => this.UpdateControlState();

            this.uxToolTip.SetToolTip(this.uxPatternText, this.patternToolTipText);
            this.uxToolTip.AutoPopDelay = 30000;

            this.patternToolTipText = Properties.Resources.FileNamePatternHelp;
        }