Пример #1
0
        public ListStringsWindow(CPWindow cpw)
        {
            InitializeComponent();
            this.cpw = cpw;

            text = new TextBox();
            text.Multiline = true;
            text.Location = new Point(10, 10);
            text.ScrollBars = ScrollBars.Both;
            text.Size = new Size(100, 100);
            text.TabIndex = 1;
            text.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
            text.SendToBack();
            this.AllowDrop = true;
            text.AllowDrop = true;
            this.Controls.Add(text);

            saveFileDialog1.DefaultExt = "txt";
            saveFileDialog1.AddExtension = true;
            saveFileDialog1.Filter = "Text files (*.txt)|*.txt";

            refreshWindow(true);
            doResize();
        }
Пример #2
0
        public OptionsWindow(CPWindow cpw)
        {
            this.cpw = cpw;
            InitializeComponent();

            openFileDialog1.CheckFileExists = false;
            openFileDialog1.InitialDirectory = Directory.GetCurrentDirectory();
            openFileDialog1.Multiselect = false;
            openFileDialog1.Title = "Specify filename and path for new log file...";
            openFileDialog1.ValidateNames = true;

            toolTip1.SetToolTip(textBox1, "Input filename and path (current date will be appended to the filename)");
            toolTip1.InitialDelay = 500;
            toolTip1.ReshowDelay = 0;
            toolTip1.AutomaticDelay = 1000;

            toolTip2.SetToolTip(button2, "Browse for filename and path (current date will be appended to the filename)");
            toolTip2.InitialDelay = 500;
            toolTip2.ReshowDelay = 0;
            toolTip2.AutomaticDelay = 1000;

            setControls();
            toggleEnableAutoSave();
        }