Exemplo n.º 1
0
        void StreamListView_Drop(object sender, DropEventArgs e)
        {
            ClientStats.LogEvent("Drop label in stream");

            var message = (Message)StreamListView.ItemContainerGenerator.ItemFromContainer(e.Target);

            if (e.Data as LabelsContainer != null)
            {
                var newLabel = (LabelsContainer)e.Data;
                message.AddLabel(new Label(newLabel.Labelname));
            }

            // For fixed labels
            if (e.Source as RadioButton != null)
            {
                var control = (RadioButton)e.Source;
                var view    = FoldersControl.GetActivityView(control);

                switch (view)
                {
                case ActivityView.Todo:
                    message.AddLabel(new Label(LabelType.Todo));
                    break;

                case ActivityView.WaitingFor:
                    message.AddLabel(new Label(LabelType.WaitingFor));
                    break;

                case ActivityView.Someday:
                    message.AddLabel(new Label(LabelType.Someday));
                    break;
                }
            }
        }
Exemplo n.º 2
0
        void CreateFoldersView()
        {
            var width = SettingsManager.SettingOrDefault <double>("/Settings/Overview/FoldersViewWidth", 150);

            if (foldersControl == null)
            {
                foldersControl = new FoldersControl();
            }

            foldersControl.Width = width;

            Root.Children.Add(foldersControl);

            DockPanel.SetDock(foldersControl, Dock.Left);

            CreateSplitter(Dock.Left);
        }
        void CreateFoldersView()
        {
            var width = SettingsManager.SettingOrDefault<double>("/Settings/Overview/FoldersViewWidth", 150);

            if (foldersControl == null)
                foldersControl = new FoldersControl();

            foldersControl.Width = width;

            Root.Children.Add(foldersControl);

            DockPanel.SetDock(foldersControl, Dock.Left);

            CreateSplitter(Dock.Left);
        }