Exemplo n.º 1
0
 private void button_tab2_next_Click(object sender, EventArgs e)
 {
     SelectedMetadata = Metas[listBox_fileList.SelectedIndex];
     CheckState(2);
     tabControl1.SelectedIndex = 2;
     configMaster = new PlotterConfig(master);
     comboBox_pens.Items.Clear();
     comboBox_pens.Items.AddRange(configMaster.Pens.Select(p => p.Name).ToArray());
     comboBox_pens.Items.Add(TB.L.Phrase["Form_PrintMaster.CustomPen"]);
     comboBox_pens.SelectedIndex = 0;
     RecalcSize();
 }
Exemplo n.º 2
0
 private void SomeFileInfo_Load(object sender, EventArgs e)
 {
     label1.Text = string.Format("Тип файла: {0}", type.ToString());
     try
     {
         if (type == InfoType.Config)
         {
             richTextBox1.Text = new PlotterConfigOptions(File.ReadAllBytes(FileName)).ToString();
         }
         else if (type == InfoType.CTable)
         {
             richTextBox1.Text = PlotterContentTable.FromBytes(File.ReadAllBytes(FileName)).ToString();
         }
         else if (type == InfoType.Pens)
         {
             richTextBox1.Text = string.Join("", PlotterConfig.GetPensFromBytes(File.ReadAllBytes(FileName)).Select(p => p.ToString() + "\n============================\n"));
         }
         else if (type == InfoType.VMeta)
         {
             richTextBox1.Text = new VectorMetaData(File.ReadAllBytes(FileName), null).ToString();
         }
         else if (type == InfoType.VData)
         {
             richTextBox1.Text = VDataToString(File.ReadAllBytes(FileName));
         }
         else if (type == InfoType.FLVData)
         {
             richTextBox1.Text = string.Join("\n", new FlFormat(File.ReadAllBytes(FileName)).Elements.Select(p => p.ToString()));
         }
         else
         {
             DialogResult = DialogResult.No;
             Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(
             string.Format("Произошла ошибка типа {0}.\n{2}\n\nНажмите \"Повтор\" для повторной попытки. Стек вызовов:\n{1}", ex.GetType().FullName, ex.StackTrace, ex.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         DialogResult = DialogResult.No;
         Close();
     }
 }
Exemplo n.º 3
0
        public GearsetSettings()
        {
            Enabled      = true;
            ShowOverlays = true;
#if WINDOWS
            InspectorConfig = new InspectorConfig();
            LoggerConfig    = new LoggerConfig();
#endif
            ProfilerConfig    = new ProfilerConfig();
            DataSamplerConfig = new DataSamplerConfig();
            PlotterConfig     = new PlotterConfig();
            TreeViewConfig    = new TreeViewConfig();
            LabelerConfig     = new LabelerConfig();
            LineDrawerConfig  = new LineDrawerConfig();
            AlerterConfig     = new AlerterConfig();
#if WINDOWS
            FinderConfig = new FinderConfig();
#endif

            // IMPORTANT:
            // NEW CONFIG INSTANCES SHOULD BE ADDED IN THE LOAD METHOD BELOW.
            DepthBufferEnabled = true;
            _saveFrequency     = 5;
        }