private void AddTasks() { /*Add WTN task */ AfniLink new_task = new AfniLink(); new_task.Text = "Add a WTN"; new_task.Icon = VLoopIcons.NewItem; new_task.LinkClicked += new EventHandler(this.OnAddWTN); _tasks.Add(new_task); /* add new plan task */ new_task = new AfniLink(); new_task.Text = "Add a new plan"; new_task.Icon = VLoopIcons.NewItem; new_task.LinkClicked += new EventHandler(this.OnAddNewPlan); _tasks.Add(new_task); /* help task */ new_task = new AfniLink(); new_task.Text = "Account Help"; new_task.Icon = VLoopIcons.Help; new_task.LinkClicked += new EventHandler(this.OnAccountHelp); _tasks.Add(new_task); }
internal static Afni.Controls.AfniLink CreateTask(string TaskName, TaskBox Group) { AfniLink task = new AfniLink(); task.Text = TaskName; Group.Tasks.Add(task); return(task); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Campaign Selection Help"; new_task.Tag = ActionTypes.DynHelp; _tasks.Add(new_task); }
bool IForm.Refresh() { int start_x = 8; int first_col_width = 0; int start_y = 90; int end_y = 96; int col = 1; int row = 0; int rows = 1; //refresh the list box lstPlan.Items.Clear(); foreach (Product product in _app.CurrentCampaign.Products) { lstPlan.Items.Add(product); } Graphics g = Graphics.FromHwnd(this.Handle); IManager bso = new ProdTypeBSO(); ArrayList types; DisplayTheme theme = _app.Theme; types = (ArrayList)bso.GetAll(); //product types rows = types.Count / 2; foreach (ProductType type in types) { AfniLink link = new AfniLink(); link.Text = type.ProductTypeDescription; link.Height = 20; link.Width = (int)g.MeasureString(link.Text, link.Font).Width + 50; if (link.Width > first_col_width) { first_col_width = link.Width; } link.Tag = type; link.Icon = VLoopIcons.Next; link.ForeColor = Color.Blue; link.LinkColor = Color.Blue; link.ActiveLinkColor = Color.Blue; link.Font = new Font("Tahoma", 8.25F); link.Left = (col == 1 ? start_x : first_col_width + 20); link.Top = start_y + (row * (link.Height + 10)); link.LinkClicked += new EventHandler(this.OnLinkClicked); this.Controls.Add(link); if (row == (rows - 1)) { row = 0; col = 2; } else { row++; } } return(true); }
bool IForm.Refresh() { ArrayList campaigns; IManager bso = new CampaignBSO(); DisplayTheme theme = _app.Theme; int row = 1; int rows = 0; int col = 1; int y_offset = 50; int first_column_width = 0; Graphics g = Graphics.FromHwnd(this.Handle); //clear out the old links foreach (AfniLink link in _links) { this.Controls.Remove(link); } _links.Clear(); campaigns = (ArrayList)bso.GetAll(); rows = campaigns.Count / 2; foreach (Campaign campaign in campaigns) { AfniLink link = new AfniLink(); link.Text = campaign.CampaignName; link.Height = 20; link.Width = (int)g.MeasureString(link.Text, link.Font).Width + 50; if (link.Width > first_column_width) { first_column_width = link.Width; } link.Tag = campaign; link.Icon = VLoopIcons.Next; link.ForeColor = theme.SpecialFormFontColor; link.LinkColor = theme.SpecialFormFontColor; link.ActiveLinkColor = theme.SpecialFormFontColor; link.Left = (col == 1 ? 20 : first_column_width + 50); link.Top = y_offset + (row * (link.Height + 10)); link.LinkClicked += new EventHandler(this.OnCampaignClick); this.Controls.Add(link); _links.Add(link); if (row == rows) { col = 2; row = 1; } else { row++; } } return(true); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Help on Searching"; new_task.Tag = ActionTypes.DynHelp; new_task.Icon = VLoopIcons.Help; _tasks.Add(new_task); }
void IViewExplorer.AddView(Viewing.View viewBase, Viewing.View parentView) { AfniLink viewLink = new AfniLink(); viewLink.Tag = viewBase; viewLink.Icon = viewBase.Icon; viewLink.Text = viewBase.ViewName; viewLink.Click += new EventHandler(this.viewLink_Clicked); _viewsBox.Tasks.Add(viewLink); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Return to Account"; new_task.LinkClicked += new EventHandler(this.OnReturnToAccount); _tasks.Add(new_task); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Call History Help"; new_task.LinkClicked += new EventHandler(this.OnCallHistoryHelp); new_task.Icon = VLoopIcons.Help; _tasks.Add(new_task); }
/// <summary> /// Event handler for a "view" link being clicked on. /// In this case, we just rip out the View object from /// the tag property of the Afni Link and load it. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void viewLink_Clicked(object sender, EventArgs e) { AfniLink viewLink = (AfniLink)sender; Viewing.View view = (Viewing.View)viewLink.Tag; _tasksBox.Tasks.Clear(); foreach (AfniLink task in view.Tasks) { _tasksBox.Tasks.Add(task); } _app.LoadView(view); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Change Campaign"; new_task.Tag = ActionTypes.CampaignSwitch; _tasks.Add(new_task); new_task.LinkClicked += new EventHandler(this.OnTaskClick); new_task = new AfniLink(); new_task.Tag = ActionTypes.DynHelp; new_task.Text = "Queue Setup Help"; _tasks.Add(new_task); new_task.LinkClicked += new EventHandler(this.OnTaskClick); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Change Campaign"; new_task.Tag = ActionTypes.CampaignSwitch; _tasks.Add(new_task); new_task.LinkClicked += new EventHandler(this.OnTaskClick); new_task = new AfniLink(); new_task.Tag = ActionTypes.DynHelp; new_task.Text = "Work Mode Selection Help"; new_task.Icon = VLoopIcons.Help; _tasks.Add(new_task); new_task.LinkClicked += new EventHandler(this.OnTaskClick); }
private void AddTasks() { /*Add Order task */ AfniLink new_task = new AfniLink(); new_task.Text = "Create New Order"; new_task.Icon = VLoopIcons.NewItem; new_task.LinkClicked += new EventHandler(this.OnNewOrder); _tasks.Add(new_task); /* help task */ new_task = new AfniLink(); new_task.Text = "Order/Sales Help"; new_task.Icon = VLoopIcons.Help; new_task.LinkClicked += new EventHandler(this.OnOrderHelp); _tasks.Add(new_task); }
private void AddTasks() { AfniLink new_task = new AfniLink(); new_task.Text = "Find another customer"; new_task.Tag = ActionTypes.Find; new_task.LinkClicked += new EventHandler(this.OnViewTaskClicked); new_task.Icon = VLoopIcons.Search; _tasks.Add(new_task); new_task = new AfniLink(); new_task.Text = "Customer Help"; new_task.Tag = ActionTypes.DynHelp; new_task.Icon = VLoopIcons.Help; new_task.LinkClicked += new EventHandler(this.OnViewTaskClicked); _tasks.Add(new_task); }
private void InitializeComponent() { //app _app.ThemeChanged += new EventHandler(this.app_ThemeChanged); _tbg = new TaskBoxGroup(); //"Tasks" task box _tasksBox = new TaskBox(); _tasksBox.Text = "Tasks"; _tbg.TaskBoxes.Add(_tasksBox); //"Other Views" task box _viewsBox = new TaskBox(); _viewsBox.Text = "Other Views"; _tbg.TaskBoxes.Add(_viewsBox); //"Details" task box _detailsBox = new TaskBox(); _detailsBox.Text = "Details"; _tbg.TaskBoxes.Add(_detailsBox); _tbg.Parent = _app.ParentForm.ExplorerPanel; _tbg.Dock = DockStyle.Fill; //Menu item _app.MenuManager.AddMenuItem(this, VLoopMenus.View, null, _name, Shortcut.None, null); _homeLink = new AfniLink(); _homeLink.Icon = VLoopIcons.VLoopHome; _homeLink.Text = "VLoop Home"; _homeLink.Click += new EventHandler(this.homeLink_Clicked); _viewsBox.Tasks.Add(_homeLink); }
private void OnCampaignClick(object sender, EventArgs e) { AfniLink link = (AfniLink)sender; _app.CurrentCampaign = (Campaign)link.Tag; }