Exemplo n.º 1
0
 private void AddPanelItemForTask(Task task)
 {
     SensePanelItem panelIt = new SensePanelItem("panelTask_" + task.InternalIdentifier);
     panelIt.Tag = task.InternalIdentifier;
     panelIt.PrimaryTextAlignment = SenseAPIs.SenseFont.PanelTextAlignment.Top;
     panelIt.PrimaryText = task.Subject;
     //			panelIt.PrimaryTextLineHeight = SenseAPIs.SenseFont.PanelTextLineHeight.SingleLine;
     panelIt.OnClick += new SensePanelItem.ClickEventHandler(taskList_Click);
     this.senseListCtrl.AddItem(panelIt);
 }
Exemplo n.º 2
0
        private void AddPanelItemForTask(Task task)
        {
            SensePanelItem panelIt = new SensePanelItem("panelTask_" + task.InternalIdentifier);

            panelIt.Tag = task.InternalIdentifier;
            panelIt.PrimaryTextAlignment = SenseAPIs.SenseFont.PanelTextAlignment.Top;
            panelIt.PrimaryText          = task.Subject;
            //			panelIt.PrimaryTextLineHeight = SenseAPIs.SenseFont.PanelTextLineHeight.SingleLine;
            panelIt.OnClick += new SensePanelItem.ClickEventHandler(taskList_Click);
            this.senseListCtrl.AddItem(panelIt);
        }
Exemplo n.º 3
0
        void taskList_Click(object Sender)
        {
            SensePanelItem panelIt        = (SensePanelItem)Sender;
            Task           task           = _tasksConfig.TaskList.Find(delegate(Task p) { return(p.InternalIdentifier == (int)panelIt.Tag); });
            FormTaskEdit   frmtaskedit    = new FormTaskEdit(task);
            DialogResult   taskEditResult = Globals.ShowDialog(frmtaskedit, this);

            switch (taskEditResult)
            {
            case DialogResult.OK:
            {
                panelIt.PrimaryText = task.Subject;
                SaveTasks();
                break;
            }

            case DialogResult.Abort:
            {
                DelTask(task);
                break;
            }
            }
        }
Exemplo n.º 4
0
        private void SetupControls()
        {
            // turn off UI updating
            this.senseListCtrl.BeginUpdate();

            // Subject textbox
            mTboxSubject = new SensePanelTextboxItem();
            mTboxSubject = new SensePanelTextboxItem("mTboxSubject");
            mTboxSubject.LayoutSytle = SenseTexboxLayoutStyle.Vertical;
            mTboxSubject.LabelText = "Subject:";
            mTboxSubject.Text = "";
            this.senseListCtrl.AddItem(mTboxSubject);

            // location button
            mBtnSetLocation = new SensePanelButtonItem("mBtnSetLocation");
            mBtnSetLocation.LabelText = "Location:";
            mBtnSetLocation.Text = "Set Location";
            mBtnSetLocation.OnClick += new SensePanelButtonItem.ClickEventHandler(OnBtnSetLocation);
            this.senseListCtrl.AddItem(mBtnSetLocation);

            // location label
            mTxtLocation = new SensePanelItem("mTxtLocation");
            mTxtLocation.PrimaryTextAlignment = SenseAPIs.SenseFont.PanelTextAlignment.Top;
            //			mTxtLocation.PrimaryTextLineHeight = SenseAPIs.SenseFont.PanelTextLineHeight.SingleLine;
            mTxtLocation.Visible = false;
            this.senseListCtrl.AddItem(mTxtLocation);

            // Action type combobox
            mCbbActionType = new SensePanelComboItem("mCbbActionType");
            mCbbActionType.OnSelectedIndexChanged += new SensePanelComboItem.SelectedIndexChangedEventHandler(OnCbbActionTypeSelectedIndexChanged);
            this.senseListCtrl.AddItem(mCbbActionType);
            mCbbActionType.Items.Add(new SensePanelComboItem.Item("Show notification", Task.ActionTypes.NOTIFICATION));
            mCbbActionType.Items.Add(new SensePanelComboItem.Item("Send SMS", Task.ActionTypes.SMS));
            mCbbActionType.Items.Add(new SensePanelComboItem.Item("Launch application", Task.ActionTypes.APP));
            mCbbActionType.LabelText = "Action type:";
            mCbbActionType.SelectedIndex = 0;

            // SMS recipient textbox
            mTboxSMSRecipient = new SensePanelTextboxItem();
            mTboxSMSRecipient = new SensePanelTextboxItem("mTboxSMSRecipient");
            mTboxSMSRecipient.LayoutSytle = SenseTexboxLayoutStyle.Vertical;
            mTboxSMSRecipient.LabelText = "SMS Recipient:";
            mTboxSMSRecipient.Text = "";
            mTboxSMSRecipient.Visible = false;
            this.senseListCtrl.AddItem(mTboxSMSRecipient);

            // SMS body textbox
            mTboxSMSBody = new SensePanelTextboxItem();
            mTboxSMSBody = new SensePanelTextboxItem("mTboxSMSBody");
            mTboxSMSBody.LayoutSytle = SenseTexboxLayoutStyle.Vertical;
            mTboxSMSBody.LabelText = "SMS Text:";
            mTboxSMSBody.Multiline = true;
            mTboxSMSBody.Height = GetLongTextBoxSize();
            mTboxSMSBody.Text = "";
            mTboxSMSBody.Visible = false;
            this.senseListCtrl.AddItem(mTboxSMSBody);

            // Select application button
            mBtnSelectApplication = new SensePanelButtonItem("mBtnSelectApplication");
            mBtnSelectApplication.LabelText = "Application:";
            mBtnSelectApplication.Text = "Select application";
            mBtnSelectApplication.OnClick += new SensePanelButtonItem.ClickEventHandler(OnBtnSelectApplication);
            mBtnSelectApplication.Visible = false;
            this.senseListCtrl.AddItem(mBtnSelectApplication);

            // monitoring period time start
            this.senseListCtrl.AddItem(new SensePanelDividerItem("DividerItemMonitorPeriod", "Monitoring period"));
            mTimeMonitorStart = new SensePanelTimeItem("mTimeMonitorStart");
            mTimeMonitorStart.AutoShowDialog = true;
            mTimeMonitorStart.ButtonAnimation = true;
            mTimeMonitorStart.PrimaryText = "Start monitoring at";
            //			mTimeMonitorStart.SecondaryText = "Style set for auto dialog...";
            mTimeMonitorStart.Time = new Time(DateTime.Now);
            this.senseListCtrl.AddItem(mTimeMonitorStart);

            // monitoring period time end
            mTimeMonitorEnd = new SensePanelTimeItem("mTimeMonitorEnd");
            mTimeMonitorEnd.AutoShowDialog = true;
            mTimeMonitorEnd.ButtonAnimation = true;
            mTimeMonitorEnd.PrimaryText = "End monitoring at";
            mTimeMonitorEnd.Time = new Time(DateTime.Now);
            this.senseListCtrl.AddItem(mTimeMonitorEnd);

            // Notes textbox
            this.senseListCtrl.AddItem(new SensePanelDividerItem("DividerItemTaskNotes", "Notes"));
            mTboxNotes = new SensePanelTextboxItem();
            mTboxNotes = new SensePanelTextboxItem("mTboxNotes");
            mTboxNotes.LayoutSytle = SenseTexboxLayoutStyle.Horizontal;
            mTboxNotes.LabelText = "";
            mTboxNotes.ShowSeparator = false;
            mTboxNotes.Multiline = true;
            mTboxNotes.Height = GetLongTextBoxSize();
            mTboxNotes.Text = "";
            this.senseListCtrl.AddItem(mTboxNotes);

            // we are done so turn on UI updating
            this.senseListCtrl.EndUpdate();

            setupSIP();
        }
Exemplo n.º 5
0
        private void SetupControls()
        {
            // turn off UI updating
            this.senseListCtrl.BeginUpdate();

            // Subject textbox
            mTboxSubject             = new SensePanelTextboxItem();
            mTboxSubject             = new SensePanelTextboxItem("mTboxSubject");
            mTboxSubject.LayoutSytle = SenseTexboxLayoutStyle.Vertical;
            mTboxSubject.LabelText   = "Subject:";
            mTboxSubject.Text        = "";
            this.senseListCtrl.AddItem(mTboxSubject);

            // location button
            mBtnSetLocation           = new SensePanelButtonItem("mBtnSetLocation");
            mBtnSetLocation.LabelText = "Location:";
            mBtnSetLocation.Text      = "Set Location";
            mBtnSetLocation.OnClick  += new SensePanelButtonItem.ClickEventHandler(OnBtnSetLocation);
            this.senseListCtrl.AddItem(mBtnSetLocation);

            // location label
            mTxtLocation = new SensePanelItem("mTxtLocation");
            mTxtLocation.PrimaryTextAlignment = SenseAPIs.SenseFont.PanelTextAlignment.Top;
            //			mTxtLocation.PrimaryTextLineHeight = SenseAPIs.SenseFont.PanelTextLineHeight.SingleLine;
            mTxtLocation.Visible = false;
            this.senseListCtrl.AddItem(mTxtLocation);

            // Action type combobox
            mCbbActionType = new SensePanelComboItem("mCbbActionType");
            mCbbActionType.OnSelectedIndexChanged += new SensePanelComboItem.SelectedIndexChangedEventHandler(OnCbbActionTypeSelectedIndexChanged);
            this.senseListCtrl.AddItem(mCbbActionType);
            mCbbActionType.Items.Add(new SensePanelComboItem.Item("Show notification", Task.ActionTypes.NOTIFICATION));
            mCbbActionType.Items.Add(new SensePanelComboItem.Item("Send SMS", Task.ActionTypes.SMS));
            mCbbActionType.Items.Add(new SensePanelComboItem.Item("Launch application", Task.ActionTypes.APP));
            mCbbActionType.LabelText     = "Action type:";
            mCbbActionType.SelectedIndex = 0;

            // SMS recipient textbox
            mTboxSMSRecipient             = new SensePanelTextboxItem();
            mTboxSMSRecipient             = new SensePanelTextboxItem("mTboxSMSRecipient");
            mTboxSMSRecipient.LayoutSytle = SenseTexboxLayoutStyle.Vertical;
            mTboxSMSRecipient.LabelText   = "SMS Recipient:";
            mTboxSMSRecipient.Text        = "";
            mTboxSMSRecipient.Visible     = false;
            this.senseListCtrl.AddItem(mTboxSMSRecipient);

            // SMS body textbox
            mTboxSMSBody             = new SensePanelTextboxItem();
            mTboxSMSBody             = new SensePanelTextboxItem("mTboxSMSBody");
            mTboxSMSBody.LayoutSytle = SenseTexboxLayoutStyle.Vertical;
            mTboxSMSBody.LabelText   = "SMS Text:";
            mTboxSMSBody.Multiline   = true;
            mTboxSMSBody.Height      = GetLongTextBoxSize();
            mTboxSMSBody.Text        = "";
            mTboxSMSBody.Visible     = false;
            this.senseListCtrl.AddItem(mTboxSMSBody);

            // Select application button
            mBtnSelectApplication           = new SensePanelButtonItem("mBtnSelectApplication");
            mBtnSelectApplication.LabelText = "Application:";
            mBtnSelectApplication.Text      = "Select application";
            mBtnSelectApplication.OnClick  += new SensePanelButtonItem.ClickEventHandler(OnBtnSelectApplication);
            mBtnSelectApplication.Visible   = false;
            this.senseListCtrl.AddItem(mBtnSelectApplication);


            // monitoring period time start
            this.senseListCtrl.AddItem(new SensePanelDividerItem("DividerItemMonitorPeriod", "Monitoring period"));
            mTimeMonitorStart = new SensePanelTimeItem("mTimeMonitorStart");
            mTimeMonitorStart.AutoShowDialog  = true;
            mTimeMonitorStart.ButtonAnimation = true;
            mTimeMonitorStart.PrimaryText     = "Start monitoring at";
            //			mTimeMonitorStart.SecondaryText = "Style set for auto dialog...";
            mTimeMonitorStart.Time = new Time(DateTime.Now);
            this.senseListCtrl.AddItem(mTimeMonitorStart);

            // monitoring period time end
            mTimeMonitorEnd = new SensePanelTimeItem("mTimeMonitorEnd");
            mTimeMonitorEnd.AutoShowDialog  = true;
            mTimeMonitorEnd.ButtonAnimation = true;
            mTimeMonitorEnd.PrimaryText     = "End monitoring at";
            mTimeMonitorEnd.Time            = new Time(DateTime.Now);
            this.senseListCtrl.AddItem(mTimeMonitorEnd);

            // Notes textbox
            this.senseListCtrl.AddItem(new SensePanelDividerItem("DividerItemTaskNotes", "Notes"));
            mTboxNotes               = new SensePanelTextboxItem();
            mTboxNotes               = new SensePanelTextboxItem("mTboxNotes");
            mTboxNotes.LayoutSytle   = SenseTexboxLayoutStyle.Horizontal;
            mTboxNotes.LabelText     = "";
            mTboxNotes.ShowSeparator = false;
            mTboxNotes.Multiline     = true;
            mTboxNotes.Height        = GetLongTextBoxSize();
            mTboxNotes.Text          = "";
            this.senseListCtrl.AddItem(mTboxNotes);

            // we are done so turn on UI updating
            this.senseListCtrl.EndUpdate();

            setupSIP();
        }