Exemple #1
0
 public FilterFileDialogF()
 {
     InitializeComponent();
     _hComboBox1 = new ComboBoxHelper(pathComboBox)
     {
         DropdownAutoWidth = true, DelegateDrawItem = true
     };
     _hComboBox2 = new ComboBoxHelper(filterComboBox)
     {
         DropdownAutoWidth = true, DelegateDrawItem = true
     };
     _hComBoBox3 = new ComboBoxHelper(nameComboBox)
     {
         DropdownAutoWidth = true, DelegateDrawItem = true
     };
     DialogResult   = DialogResult.None;
     Resizeable     = true;
     TitleBar.Style = TitleBarStyles.MaxEnd;
     // 初始化
     Filter = Filter;
     icoColumn.ValuesAreIcons = true;
     icoColumn.Icon           = ConvertHelper.Bitmap2Icon(new Bitmap(1, 1));
     //窗口的最大大小
     //字段初始化
     MaximizedBounds = Screen.PrimaryScreen.WorkingArea;
     Text            = SaveFileDialog.DEFAULT_TITLE;
     Comm.Initialize(this, FormHelper);
 }
Exemple #2
0
        /// <summary>
        /// 应用对话框公共属性,应在Load事件中调用此方法
        /// </summary>
        /// <param name="f"></param>
        internal static void ApplyComm(System.Windows.Forms.Form f)
        {
            if (f.Owner == null || f.Owner.Visible == false || f.Owner.WindowState == System.Windows.Forms.FormWindowState.Minimized)
            {
                FormHelper.CenterToScreen(f);
            }
            f.ShowInTaskbar = f.Owner == null;
            Icon _ico;

            if (f.Owner == null)
            {
                _ico = ConvertHelper.Bitmap2Icon(Windows.Logos.Application);
            }
            else
            {
                _ico = f.Owner.Icon;
            }

            if (f is ICommDialogWindow)
            {
                ((ICommDialogWindow)f).Icon = _ico;
            }
            else
            {
                f.Icon = _ico;
            }
        }
Exemple #3
0
        public TextBoxF()
        {
            InitializeComponent();
            Resizeable  = true;
            _searchBox  = new SearchPanel(this);
            _replaceBox = new ReplacePanel(this);
            //移动窗体
            FormHelper.Move(panel_tools);
            FormHelper.SetFormRoundRgn(3, 3);
            FormHelper.AutoBorder(new UI.BorderSize(), new UI.BorderSize(3, 1, 3, 3));

            MaximizedBounds = Screen.PrimaryScreen.WorkingArea;
            Icon            = ConvertHelper.Bitmap2Icon(Windows.Logos.Application);
            _menuRender     = new MenuRender();
            setTheme(2);
            CurrentText           = string.Empty;
            TaskbarSetWindowState = true;
        }