// ========================================
 // constructor
 // ========================================
 public MemoStyledTextFocusContextMenuProvider(StyledTextFocus focus, IEditor editor, bool canSplit) : base(focus)
 {
     _app      = MemopadApplication.Instance;
     _focus    = focus;
     _editor   = editor;
     _canSplit = canSplit;
 }
예제 #2
0
        // ========================================
        // constructor
        // ========================================
        public MemoTextEditorHandle()
        {
            _app = MemopadApplication.Instance;

            _isSelectedOnMouseDown = false;
            _toggle = false;
        }
예제 #3
0
        // ========================================
        // constructor
        // ========================================
        public TagSelector(Memo memo)
        {
            InitializeComponent();

            _targetMemo = memo;

            _facade = MemopadApplication.Instance;
        }
예제 #4
0
        // ========================================
        // constructor
        // ========================================
        public FolderTreePresenter(TreeView tree, TreeNodeEx root)
        {
            Contract.Requires(tree != null);
            Contract.Requires(root != null);

            _facade = MemopadApplication.Instance;
            _tree   = tree;
            _root   = root;
        }
예제 #5
0
        // ========================================
        // constructor
        // ========================================
        public WorkspaceView()
        {
            InitializeComponent();

            _app       = MemopadApplication.Instance;
            _workspace = _app.Workspace;

            _contextMenusEnabled = true;
        }
예제 #6
0
        // ========================================
        // constructor
        // ========================================
        protected MemopadFormBase()
        {
            _facade  = MemopadApplication.Instance;
            _uiLogic = new MemopadUILogic();

            _toolSelectorDropDown      = new ToolSelectorDropDown(this);
            _nodeStyleSelectorDropDown = new NodeStyleSelectorDropDown(this);
            _lineStyleSelectorDropDown = new LineStyleSelectorDropDown(this);
            _freehandSelectorDropDown  = new FreehandSelectorDropDown(this);
        }
예제 #7
0
        // ========================================
        // constructor
        // ========================================
        public TagTree()
        {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            AllowDrop          = true;
            LabelEdit          = true;
            TreeViewNodeSorter = new TagTreeNodeComparer();
        }
예제 #8
0
        // ========================================
        // constructor
        // ========================================
        public MemoListView()
        {
            InitializeComponent();

            _app = MemopadApplication.Instance;

            _memoListBox.Sorted    = true;
            _memoListBox.DragOver += HandleMemoListBoxDragOver;
            _memoListBox.DragDrop += HandleMemoListBoxDragDrop;
        }
예제 #9
0
        // ========================================
        // constructor
        // ========================================
        public FusenForm()
        {
            InitializeComponent();

            ShowInTaskbar = false;
            Icon          = Resources.confidante;
            //TransparencyKey = Color.White;

            _app = MemopadApplication.Instance;
        }
예제 #10
0
        // ========================================
        // constructor
        // ========================================
        public TimeSpanPickForm() {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            var theme = _facade.Theme;
            Font = theme.CaptionFont;
            _okButton.Font = theme.CaptionFont;
            _cancelButton.Font = theme.CaptionFont;
            _timeSpanPicker.CaptionFont = theme.CaptionFont;
            _timeSpanPicker.InputFont = theme.InputFont;
        }
        // ========================================
        // constructor
        // ========================================
        public MemoTableCellEditorHandle()
        {
            _facade = MemopadApplication.Instance;

            _selectScenario    = new SelectScenario(this, false);
            _isScenarioHandled = false;

            _startRowIndex = -1;
            _startColIndex = -1;
            _endRowIndex   = -1;
            _endColIndex   = -1;
        }
예제 #12
0
        // ========================================
        // constructor
        // ========================================
        public TagManageForm()
        {
            InitializeComponent();

            _app = MemopadApplication.Instance;

            _tagTreeViewKeyMap = new KeyMap <TreeView>();
            _app.KeySchema.TreeViewKeyBinder.Bind(_tagTreeViewKeyMap);

            _tagTreeView.Updated += (sender, e) => _tagTreeView.ExpandAll();
            _tagTreeView.UpdateTags();
        }
예제 #13
0
        // ========================================
        // constructor
        // ========================================
        public MarkSelectForm()
        {
            InitializeComponent();

            _facade = MemopadApplication.Instance;

            var theme = _facade.Theme;

            Font = theme.CaptionFont;
            _markDefinitionCheckedListBox.StateCommon.Border.Color1 = SystemColors.ControlDark;

            InitMarkDefCheckListBox();
        }
예제 #14
0
        // ========================================
        // constructor
        // ========================================
        public QueryHolderEditForm()
        {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            var theme = _facade.Theme;

            Font = theme.CaptionFont;

            _nameTextBox.TextChanged += HandleNameTextBoxTextChanged;
            ValidateInput();
        }
예제 #15
0
        // ========================================
        // constructor
        // ========================================
        public ImportanceSelectForm()
        {
            InitializeComponent();

            _app = MemopadApplication.Instance;

            var theme = _app.Theme;

            Font = theme.CaptionFont;
            _importanceCheckedListBox.StateCommon.Border.Color1 = SystemColors.ControlDark;

            InitCheckListBox();
        }
예제 #16
0
        // ========================================
        // constructor
        // ========================================
        public MemopadNotifyIcon()
        {
            _app = MemopadApplication.Instance;

            _notifyIcon         = new NotifyIcon();
            _notifyIcon.Text    = "MochaNote";
            _notifyIcon.Icon    = Properties.Resources.confidante;
            _notifyIcon.Visible = true;

            _notifyIconContextMenu        = CreateNotifyIconContextMenu();
            _notifyIcon.ContextMenuStrip  = _notifyIconContextMenu;
            _notifyIcon.MouseClick       += HandleNotifyIconMouseClick;
            _notifyIcon.MouseDoubleClick += HandleNotifyIconMouseDoubleClick;
        }
예제 #17
0
        // ========================================
        // constructor
        // ========================================
        public AboutBox()
        {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            //var ver = _facade.Settings.Version;
            var ver = "1.0.0";

            Text = String.Format("MochaNoteのバージョン情報");
            _productNameLabel.Text   = "MochaNote Version " + ver;
            _copyrightLabel.Text     = "Copyright (c) 2010-2016 mocha All rights reserved.";
            _descriptionTextBox.Text = GetDescription();
        }
예제 #18
0
        // ========================================
        // constructor
        // ========================================
        public TagTreePresenter(TreeView tree, TreeNodeEx root, bool isUntaggedEnabled)
        {
            Contract.Requires(tree != null);
            Contract.Requires(root != null);

            _facade = MemopadApplication.Instance;
            _tree   = tree;
            _root   = root;

            _isUntaggedEnabled = isUntaggedEnabled;
            if (_isUntaggedEnabled)
            {
                _untaggedNode     = new TreeNodeEx(UntaggedText);
                _untaggedNode.Tag = UntaggedObj;
            }

            _findMemoWithDescendants = false;
        }
예제 #19
0
        // ========================================
        // constructor
        // ========================================
        public LinkSelectForm()
        {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            _workspaceView.PanelPadding = new Padding(0);

            var theme = _facade.Theme;

            _workspaceView.Theme = theme;
            _memoListView.Theme  = theme;

            Font                  = theme.CaptionFont;
            _okButton.Font        = theme.CaptionFont;
            _cancelButton.Font    = theme.CaptionFont;
            _linkTargetLabel.Font = theme.CaptionFont;
            _titleTextLabel.Font  = theme.CaptionFont;
            _addressLabel.Font    = theme.CaptionFont;

            _linkTargetListBox.Font = theme.InputFont;
            _titleTextTextBox.Font  = theme.InputFont;
            _addressTextBox.Font    = theme.InputFont;

            _inited = false;


            _memoLinkPanel.Paint += (s, e) => {
                ControlPaintUtil.DrawBorder(
                    e.Graphics,
                    _workspaceView.Bounds,
                    SystemColors.ControlDark,
                    SystemColors.Window,
                    1
                    );
                ControlPaintUtil.DrawBorder(
                    e.Graphics,
                    _memoListView.Bounds,
                    SystemColors.ControlDark,
                    SystemColors.Window,
                    1
                    );
            };
        }
예제 #20
0
        // ========================================
        // constructor
        // ========================================
        public MemoQueryBuilderView()
        {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            var theme = _facade.Theme;

            _titleLabel.Font           = theme.CaptionFont;
            _tagLabel.Font             = theme.CaptionFont;
            _markLabel.Font            = theme.CaptionFont;
            _importanceLabel.Font      = theme.CaptionFont;
            _timeSpanLabel.Font        = theme.CaptionFont;
            _flowLayoutPanel.BackColor = theme.DarkBackColor;

            _tagTextBox.ValueChanged        += (s, e) => OnQueryUpdated();
            _markTextBox.ValueChanged       += (s, e) => OnQueryUpdated();
            _importanceTextBox.ValueChanged += (s, e) => OnQueryUpdated();
            _timeSpanTextBox.ValueChanged   += (s, e) => OnQueryUpdated();
        }
예제 #21
0
        // ========================================
        // constructor
        // ========================================
        public StartPageContent()
        {
            InitializeComponent();
            DoubleBuffered = true;

            _facade = MemopadApplication.Instance;
            var theme = _facade.Theme;

            Font = theme.CaptionFont;

            _titleLabel.Font  = new Font(theme.CaptionFont.Name, 16, FontStyle.Bold);
            _recentLabel.Font = new Font(theme.CaptionFont.Name, 12);
            _borderColor      = KryptonManager.CurrentGlobalPalette.GetBorderColor1(
                PaletteBorderStyle.ControlClient,
                PaletteState.Normal
                );

            _recentlyClosedListBox.ListBox.MouseDown += HandleRecentlyClosedListBoxMouseDown;

            _facade.RecentlyClosedMemoInfosChanged += HandleFacadeRecentlyClosedMemoInfosChanged;
        }
예제 #22
0
        // ========================================
        // constructor
        // ========================================
        public MemopadFormMediator(
            MemopadForm mainForm,
            WorkspaceView workspaceView,
//            MemoQueryBuilderView memoQueryBuilderView,
            MemoListView memoListView
            )
        {
            Contract.Requires(workspaceView != null);
//            Contract.Requires(memoQueryBuilderView != null);
            Contract.Requires(memoListView != null);

            _facade = MemopadApplication.Instance;
            _finder = new MemoFinder();

            _mainForm      = mainForm;
            _workspaceView = workspaceView;
//            _memoQueryBuilderView = memoQueryBuilderView;
            _memoListView = memoListView;

            _memoListView.MemoListBox.CanDragStart = true;

            InitHandlers();
        }
예제 #23
0
        // ========================================
        // constructor
        // ========================================
        public TagSelectForm()
        {
            _facade = MemopadApplication.Instance;

            InitializeComponent();

            var theme = _facade.Theme;

            Font = theme.CaptionFont;

            _anyRadioButton.Checked = true;
            _allRadioButton.Checked = false;

            _tagTree.IsUntaggedEnabled = true;
            _tagTree.IsAllTagsEnabled  = false;
            _tagTree.UpdateTags();
            _tagTree.TagRootNode.ExpandAll();

            _tagTreePanel.Paint += (ps, pe) => {
                ControlPaintUtil.DrawBorder(
                    pe.Graphics, _tagTree, SystemColors.ControlDark, _tagTree.BackColor, 1
                    );
            };
        }
예제 #24
0
        // ========================================
        // constructor
        // ========================================
        public PageContent(MemoInfo info)
        {
            InitializeComponent();
            DoubleBuffered = true;
            ResizeRedraw   = true;

            _facade            = MemopadApplication.Instance;
            _info              = info;
            _titleTextBox.Text = _info.Title;

            Memo = _facade.Container.Find <Memo>(info.MemoId);
            _tagSelectorToolStripItem            = new TagSelectorToolStripItem(_memo);
            _selectTagContextMenuStrip.AutoClose = false;

            _dateLabelWidth = _modifiedDateLabel.Width;

            _isInMemoSearcherShown = false;

            _keyMap = new KeyMap <PageContent>();
            if (!DesignMode)
            {
                DefineAdditionalKeyMap(_keyMap);
            }

            _titleTextBoxKeyMap  = new KeyMap <TextBox>();
            _sourceTextBoxKeyMap = new KeyMap <TextBox>();
            if (!DesignMode)
            {
                _facade.KeySchema.PageContentTitleTextBoxKeyBinder.Bind(_titleTextBoxKeyMap);
                _facade.KeySchema.PageContentTitleTextBoxKeyBinder.Bind(_sourceTextBoxKeyMap);
            }

            _tagTextBox.GotFocus += (se, ev) => {
                User32PI.HideCaret(_tagTextBox.Handle);
            };
        }
예제 #25
0
 // ========================================
 // constructor
 // ========================================
 public DataFolderExporter()
 {
     _app = MemopadApplication.Instance;
 }
예제 #26
0
 // ========================================
 // constructor
 // ========================================
 public MemopadRemoteFacade()
 {
     _facade = MemopadApplication.Instance;
 }
예제 #27
0
 // ========================================
 // constructor
 // ========================================
 public MemoShapeEditorHandle()
 {
     _facade = MemopadApplication.Instance;
 }
예제 #28
0
 // ========================================
 // constructor
 // ========================================
 public MemopadUILogic()
 {
     _facade = MemopadApplication.Instance;
 }
예제 #29
0
 // ========================================
 // constructor
 // ========================================
 public AllMemosPresenter()
 {
     _facade = MemopadApplication.Instance;
 }
예제 #30
0
 // ========================================
 // constructor
 // ========================================
 public TrashBoxPresenter()
 {
     _facade = MemopadApplication.Instance;
 }