コード例 #1
0
        void SearchTextBox_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Up:
            {
                int index = MainListView.SelectedIndex;
                index -= 1;

                if (index < 0)
                {
                    index = 0;
                }

                MainListView.SelectedIndex = index;
                MainListView.ScrollIntoView(MainListView.SelectedItem);
            }
            break;

            case Key.Down:
            {
                int index = MainListView.SelectedIndex;

                if (++index > MainListView.Items.Count - 1)
                {
                    index = MainListView.Items.Count - 1;
                }

                MainListView.SelectedIndex = index;
                MainListView.ScrollIntoView(MainListView.SelectedItem);
            }
            break;
            }
        }
コード例 #2
0
        /// <summary>
        /// Trie les colonnes dans l'ordre ascendant au premier clique et descendant au deuxième
        /// </summary>
        /// <param name="Event"></param>
        private void SortColumn(ColumnClickEventArgs Event)
        {
            // Verifie si la colonne cliquée est la meme que la derniere fois
            if (Event.Column != SortedColumn)
            {
                // mais a jour la derniere colonne cliquee
                SortedColumn = Event.Column;
                // puis mets le tri en ascendant
                MainListView.Sorting = SortOrder.Ascending;
            }
            else
            {
                // inverse le tri (ascendant si descendant et vice versa)
                if (MainListView.Sorting == SortOrder.Ascending)
                {
                    MainListView.Sorting = SortOrder.Descending;
                }
                else
                {
                    MainListView.Sorting = SortOrder.Ascending;
                }
            }

            MainListView.Sort();
            // utilise ListViewItemComparer qui implemente ICompare pour trier
            MainListView.ListViewItemSorter = new ListViewItemComparer(Event.Column, MainListView.Sorting);
        }
コード例 #3
0
        private void InitComposition()
        {
            // Get our Compositor as well as the ScrollViewer that corresponds to
            // to our ListView. Then get the CompositionPropertySet that corresponds
            // to the ScrollViewer.
            var compositor          = ElementCompositionPreview.GetElementVisual(this).Compositor;
            var scrollViewer        = MainListView.GetChildOfType <ScrollViewer>();
            var scrollerPropertySet = ElementCompositionPreview.GetScrollViewerManipulationPropertySet(scrollViewer);

            // Construct our parallax expression using the property set we got from the
            // ScrollViewer. Also we make sure to clamp the result so that the image doesn't
            // go off the screen/window.
            var expression = compositor.CreateExpressionAnimation("Clamp(scroller.Translation.Y * parallaxFactor, -608, 999)");

            expression.SetScalarParameter("parallaxFactor", 0.3f);
            expression.SetReferenceParameter("scroller", scrollerPropertySet);

            // Assign our expression to the visual that represents our BackgroundImage.
            var backgroundVisual = ElementCompositionPreview.GetElementVisual(BackgroundImage);

            backgroundVisual.StartAnimation("Offset.Y", expression);

            // Get the visual that represents our HeaderTextBlock and also set up part
            // of our expression.
            var    textVisual = ElementCompositionPreview.GetElementVisual(HeaderTextBlock);
            String progress   = "Clamp(visual.Offset.Y / -100.0, 0.0, 1.0)";

            // Create the expression and add in our progress string.
            var textExpression = compositor.CreateExpressionAnimation("Lerp(Vector3(0, 200, 0), Vector3(0, 0, 0), " + progress + ")");

            textExpression.SetReferenceParameter("visual", backgroundVisual);

            // Assign our expression to the text visual.
            textVisual.StartAnimation("Offset", textExpression);
        }
コード例 #4
0
 private void selectAllButton_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < MainListView.Items.Count; i++)
     {
         MainListView.SetItemCheckState(i, CheckState.Checked);
     }
 }
        private async Task Refresh()
        {
            MainListView.IsRefreshing = true;
            await viewModel.RefreshListViewData();

            MainListView.EndRefresh();
        }
コード例 #6
0
ファイル: YvrForm.cs プロジェクト: dexyfex/CodeWalker
 public void LoadListView()
 {
     MainListView.BeginUpdate(); // performance
     foreach (var entry in yvr.Records.Entries.data_items)
     {
         string[] row =
         {
             FloatUtil.ToString(entry.Position.X),
             FloatUtil.ToString(entry.Position.Y),
             FloatUtil.ToString(entry.Position.Z),
             entry.Time.ToString(),
             FloatUtil.ToString(entry.Velocity.X),
             FloatUtil.ToString(entry.Velocity.Y),
             FloatUtil.ToString(entry.Velocity.Z),
             FloatUtil.ToString(entry.Right.X),
             FloatUtil.ToString(entry.Right.Y),
             FloatUtil.ToString(entry.Right.Z),
             FloatUtil.ToString(entry.Forward.X),
             FloatUtil.ToString(entry.Forward.Y),
             FloatUtil.ToString(entry.Forward.Z),
             FloatUtil.ToString(entry.Steering),
             FloatUtil.ToString(entry.GasPedal),
             FloatUtil.ToString(entry.BrakePedal),
             entry.Handbrake.ToString(),
         };
         MainListView.Items.Add(new ListViewItem(row));
     }
     MainListView.EndUpdate();
 }
コード例 #7
0
        public Dam(List <SpExtrato> _ListaSelecionados, List <SpExtrato> _ListaTributos)
        {
            InitializeComponent();
            tBar.Renderer                  = new MySR();
            _lista_selecionados            = _ListaSelecionados;
            _extrato                       = _ListaTributos;
            DataVencimentoText.Text        = DateTime.Now.ToString("dd/MM/yyyy");
            HonoraioCheckBox.Enabled       = gtiCore.GetBinaryAccess((int)TAcesso.DAM_Honorario);
            DesativarRefisCheckBox.Enabled = gtiCore.GetBinaryAccess((int)TAcesso.DAM_Desativar_Refis);
            bool bAllow = gtiCore.GetBinaryAccess((int)TAcesso.DAM_Desconto);

            if (!bAllow)
            {
                MultaUpDown.Enabled           = false;
                CorrecaoUpDown.Enabled        = false;
                JurosUpDown.Enabled           = false;
                MultaRefreshButton.Enabled    = false;
                JurosRefreshButton.Enabled    = false;
                CorrecaoRefreshButton.Enabled = false;
                MultaUpDown.BackColor         = BackColor;
                JurosUpDown.BackColor         = BackColor;
                CorrecaoUpDown.BackColor      = BackColor;
            }
            Header();
            Carrega_Lista();
            MainListView.Items[0].Selected = true;
            MainListView.Focus();
        }
コード例 #8
0
 public void LoadListView()
 {
     MainListView.BeginUpdate(); // performance
     foreach (var entry in yvr.Records.Entries.data_items)
     {
         string[] row =
         {
             FloatUtil.ToString(entry.PositionX),
             FloatUtil.ToString(entry.PositionY),
             FloatUtil.ToString(entry.PositionZ),
             entry.Time.ToString(),
             entry.VelocityX.ToString(),
             entry.VelocityY.ToString(),
             entry.VelocityZ.ToString(),
             entry.RightX.ToString(),
             entry.RightY.ToString(),
             entry.RightZ.ToString(),
             entry.TopX.ToString(),
             entry.TopY.ToString(),
             entry.TopZ.ToString(),
             entry.SteeringAngle.ToString(),
             entry.GasPedalPower.ToString(),
             entry.BrakePedalPower.ToString(),
             entry.HandbrakeUsed.ToString(),
         };
         MainListView.Items.Add(new ListViewItem(row));
     }
     MainListView.EndUpdate();
 }
コード例 #9
0
 public void SelectFirst()
 {
     if (MainListView.Items.Count > 0)
     {
         MainListView.SelectedIndex = 0;
         MainListView.ScrollIntoView(MainListView.SelectedItem);
     }
 }
コード例 #10
0
        private void DoStuff()
        {
            Predicate <string> adder = t => !t.EndsWith("backup") && !t.EndsWith(".tfc") && !t.EndsWith(".sfar");

            ProgressUpdater.ChangeProgressBar(0, MainListView.Items.Count);
            for (int i = 0; i < MainListView.Items.Count; i++)
            {
                if (cts.IsCancellationRequested)
                {
                    DebugOutput.PrintLn("Extraction cancelled!");
                    return;
                }
                bool ischecked = false;
                this.Invoke(new Action(() => ischecked = MainListView.GetItemChecked(i)));
                if (ischecked)
                {
                    DLCInfo dlc = DLCs[i];
                    if (dlc.isBaseGame == false)
                    {
                        if (dlc.isBackupPresent && dlc.UseExtracted == false)
                        {
                            // KFreon: Delete extracted and restore from backup
                            StatusUpdater.UpdateText("Deleting old files and restoring backup for: " + dlc.Name);
                            File.Delete(dlc.sfar);
                            dlc.ExtractedFiles.ForEach(t => File.Delete(t));
                            File.Copy(dlc.BackupFileName, dlc.sfar);
                        }
                        else if (dlc.BackupRequested == true)
                        {
                            // KFreon: Backup sfar
                            StatusUpdater.UpdateText("Backing up: " + dlc.Name);
                            File.Copy(dlc.sfar, Path.ChangeExtension(dlc.sfar, ".backup"));
                        }
                        else if (dlc.UseExtracted == true)
                        {
                            FilesToAddToTree.AddRange(dlc.Files.Where(a => adder(a)));
                            ProgressUpdater.IncrementBar();
                            continue;
                        }

                        // KFreon: Extract
                        StatusUpdater.UpdateText("Extracting DLC: " + dlc.Name);

                        if (File.Exists(dlc.sfar))
                        {
                            DLCExtractHelper(dlc.sfar);
                            dlc.GetFiles();
                        }
                        else
                        {
                            DebugOutput.PrintLn("DLC: " + dlc.sfar + "  failed.");
                        }
                    }
                    FilesToAddToTree.AddRange(dlc.Files.Where(a => adder(a)));
                }
                ProgressUpdater.IncrementBar();
            }
        }
コード例 #11
0
 private void TimeLinePage_Loaded(object sender, RoutedEventArgs e)
 {
     if (IsUsingCachedWhenNavigate())
     {
         return;
     }
     MainPivot.SelectionChanged += MainPivot_SelectionChanged;
     MainListView.SetRefresh(true);
 }
コード例 #12
0
        private void CategoryListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            var category = e.ClickedItem as Others;

            VM.CurrentCategoryId = category.id;
            VM.CategoryName      = category.name;
            MainListView.SetRefresh(true);
            ResetCategoryPanel();
        }
コード例 #13
0
        private async void RefreshMainList()
        {
            await VM.Refresh();

            MainListView.SetRefresh(false);
            if (!Config.IsSinglePage)
            {
                DisplayStory(ViewModelBase.CurrentStoryId);
            }
        }
コード例 #14
0
 private void InitializeViews()
 {
     m_HomeView          = new HomeView();
     m_MainListView      = new MainListView();
     m_ProductListView   = new ProductListView();
     m_FilterView        = new FilterView();
     m_ProductImportView = new ProductImportView();
     m_ProductExportView = new ProductExportView();
     m_DeliveryView      = new DeliveryView();
 }
コード例 #15
0
        private void ListenWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            if (e.ProgressPercentage == 0)
            {
                EmployeeInfo info = (EmployeeInfo)e.UserState;

                int    id   = info.id;
                string name = info.name;
                foreach (ListViewItem v in MainListView.Items)
                {
                    if (v.SubItems[1].Text == name)
                    {
                        Console.WriteLine("Found duplicate employee name, changing a little bit...");
                        name += "_" + id.ToString();
                    }
                }

                var item = new ListViewItem(id.ToString());
                item.SubItems.Add(name);
                item.SubItems.Add("-1");
                item.SubItems.Add(info.pc);

                MainListView.BeginUpdate();
                MainListView.Items.Add(item);
                MainListView.EndUpdate();

                Console.WriteLine($"Added {info.counter} employee...");
                UpdateEmpNum(info.counter);
                NotifyNewEmp(id.ToString(), name, info.pc);
            }
            else if (e.ProgressPercentage == 1)
            {
                UpdateInfo info = (UpdateInfo)e.UserState;

                MainListView.BeginUpdate();
                foreach (ListViewItem items in MainListView.Items)
                {
                    if (items.Text == info.id.ToString())
                    {
                        int t = int.Parse(items.SubItems[2].Text);
                        if (t == -1 || info.newtime < t)
                        {
                            Console.WriteLine($"Updating best time for employee {items.Text} was {t}...");
                            items.SubItems[2].Text = info.newtime.ToString();
                        }
                        else
                        {
                            Console.WriteLine($"New time is worse than the current time for {items.Text} it's {info.newtime} / {t}");
                        }
                        break;
                    }
                }
                MainListView.EndUpdate();
            }
        }
コード例 #16
0
 private void CancelarButton_Click(object sender, EventArgs e)
 {
     bAddNew = false;
     ControlBehaviour(true);
     MainListView.Focus();
     if (MainListView.SelectedItems.Count == 0)
     {
         MainListView.Items[0].Selected = true;
     }
     MainListView_SelectedIndexChanged(null, null);
 }
コード例 #17
0
        private async void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (IsUsingCachedWhenNavigate())
            {
                return;
            }
            await InitUI();

            AuthorizationHelper.AutoLogin(VM.LoginSuccess);

            MainListView.SetRefresh(true);
        }
コード例 #18
0
        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (IsUsingCachedWhenNavigate())
            {
                return;
            }

            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;

            AuthorizationHelper.AutoLogin(VM.LoginSuccess);

            MainListView.SetRefresh(true);
        }
コード例 #19
0
        private void MyFav_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthorizationHelper.IsLogin)
            {
                PopupMessage.DisplayMessageInRes("NeedLogin");
                return;
            }

            VM.CurrentCategoryId = Misc.Favorite_Category_Id;
            VM.CategoryName      = string.Format(StringUtil.GetString("FavCategoryName"), 0);
            MainListView.SetRefresh(true);
            ResetCategoryPanel();
        }
コード例 #20
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
		protected void Page_Load(object sender, EventArgs e)
		{
            AdminView view = ManagementContext.Current.FindView(this.AppId, this.ViewId);

            // Check view permissions
            if (view.Attributes.Contains("permissions"))
            {
                if (!ProfileContext.Current.CheckPermission(view.Attributes["permissions"].ToString()))
                    throw new UnauthorizedAccessException("Current user does not have enough rights to access the requested operation.");
            }

			Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "InitializeEcfListViewConstants",
				String.Format("CSManagementClient.EcfListView_PrimaryKeySeparator = '{0}';", EcfListView.ExtenderPrimaryKeyAttributeSeparator), true);

			HtmlTable tbl = this.FindControl("topTable") as HtmlTable;
			if (tbl != null)
			{
				if (this.ShowTopToolbar)
				{
					tbl.Visible = true;

					// bind MetaToolbar
					MetaToolbar1.ViewName = this.AppId;
					MetaToolbar1.PlaceName = this.ViewId;
					MetaToolbar1.GridClientId = GetListViewClientID();
					MetaToolbar1.DataBind();
				}
				else
				{
					DockTop.DefaultSize = 0;
					DockTop.Visible = false;
					tbl.Visible = false;
				}
				//tbl.Style["display"] = "none";
			}

			if (InnerListViewTable != null)
                gvHeaderExtender.TargetControlID = InnerListViewTable.UniqueID;

			gvHeaderExtender.ContextKey = UtilHelper.JsonSerialize(new EcfListViewContextKey(this.AppId, this.ViewId));
			gvHeaderExtender.ServicePath = ResolveUrl("~/Apps/Core/Controls/WebServices/EcfListViewExtenderService.asmx");

			DropDownList pagingList = MainListView.FindControl(EcfListView.DefaultPagingDropdownId) as DropDownList;
			if (pagingList != null)
				pagingList.SelectedIndexChanged += new EventHandler(ddPaging_SelectedIndexChanged);

			if (!IsPostBack && CurrentPager != null)
			{
				CurrentPager.SetPageProperties(0, CurrentListView.CurrentPageSize, true);
			}
		}
コード例 #21
0
        void viewModel_SelectedAccountTypeChanged(object sender, System.EventArgs e)
        {
            var gridView = MainListView.View as GridView;

            if (ViewModel != null && gridView != null)
            {
                gridView.Columns.Where(x => x != gridView.Columns.First()).ToList().ForEach(x => gridView.Columns.Remove(x));
                if (ViewModel.SelectedEntityType != null)
                {
                    ViewModel.SelectedEntityType.EntityCustomFields.Where(x => !x.Hidden).Select(CreateColumn).ToList().ForEach(x => gridView.Columns.Add(x));
                }
                MainListView.RaiseEvent(new RoutedEventArgs(LoadedEvent, MainListView));
            }
        }
コード例 #22
0
        private async void LoadMoreStories()
        {
            if (_isLoadComplete)
            {
                MainListView.FinishLoadingMore();
                return;
            }

            var preCount = VM.StoryDataList.Count;
            await VM.LoadMore();

            MainListView.FinishLoadingMore();
            _isLoadComplete = preCount == VM.StoryDataList.Count;
        }
コード例 #23
0
        /// <summary>
        /// Binds the extender columns.
        /// </summary>
		private void BindExtenderColumns()
		{
			List<GridViewColumnInfo> ciCollection = new List<GridViewColumnInfo>();

			// fill GridViewColumnInfo collection
			AdminView view = MainListView.GetAdminView();
			if (view != null)
			{
				// get settings
				string gridSettingsKey = CMPageSettings.MakeGridSettingsKey(this.AppId, this.ViewId);
				string oldGridSettings = ProfileContext.Current.Profile.PageSettings.GetSettingString(gridSettingsKey);
				EcfListViewPreferences prefs = null;
				if (!String.IsNullOrEmpty(oldGridSettings))
					prefs = UtilHelper.JsonDeserialize<EcfListViewPreferences>(oldGridSettings);

				// set columns' properties
				gvHeaderExtender.ColumnsInfo.Clear();
				foreach (ViewColumn viewColumn in view.Columns)
				{
					if (!viewColumn.Visible)
						continue;

					GridViewColumnInfo gvColumn = new GridViewColumnInfo();
					gvColumn.Sortable = viewColumn.ColumnType == ColumnType.Action ? false : viewColumn.AllowSorting;
					gvColumn.Resizable =
						viewColumn.ColumnType == ColumnType.CheckBox || viewColumn.ColumnType == ColumnType.Action ?
						false : viewColumn.Resizable;
					int width = 0;
					if (viewColumn.ColumnType == ColumnType.CheckBox)
						// checkbox column should be of fixed width
						width = EcfListView.DefaultCheckboxColumnWidth;
					else
					{
						// set width
						if (prefs != null && prefs.ColumnProperties[viewColumn.ColumnIndex.ToString()] != null)
							width = Int32.Parse((string)prefs.ColumnProperties[viewColumn.ColumnIndex.ToString()]);
						else if (!Int32.TryParse(viewColumn.Width, out width))
							width = EcfListView.DefaultColumnWidth;
					}
					gvColumn.Width = width;

					gvHeaderExtender.ColumnsInfo.Add(gvColumn);
				}
			}

			this.gvHeaderExtender.HeaderHeight = EcfListView.DefaultHeaderHeight;

			this.gvHeaderExtender.StyleInfo = new Mediachase.Ibn.Web.UI.WebControls.GridStylesInfo(MainListView.HeaderCssClass, MainListView.GridCssClass, MainListView.FooterCssClass, MainListView.HeaderInnerCssClass, MainListView.GridInnerCssClass, MainListView.GridSelectedRowCssClass);
		}
コード例 #24
0
        protected override void Initialize()
        {
            var taskAdministrationView      = new TaskAdministrationMasterView.TaskAdministrationMasterView();
            var taskAdministrationViewModel = Container.Resolve <ITaskAdministrationMasterViewModel>();

            taskAdministrationView.ViewModel = taskAdministrationViewModel;
            MasterView = taskAdministrationView;

            var taskTreeView      = Container.Resolve <ITaskTreeView>();
            var taskTreeViewModel = Container.Resolve <ITaskTreeViewModel>();

            taskTreeView.ViewModel = (taskTreeViewModel);

            TaskTreeView = taskTreeView;

            var taskGridView      = new MainListView();
            var taskGridViewModel = Container.Resolve <ITaskGridViewModel>();

            taskGridView.ViewModel = (taskGridViewModel);
            TaskGridView           = taskGridView;

            var filterViewModel = Container.Resolve <IFilterViewModel>();
            var filterView      = new FilterView.FilterView();

            filterView.ViewModel = (filterViewModel);

            FilterView = filterView;

            var buttonPanelViewModel = Container.Resolve <IButtonPanelViewModel>();
            var buttonPanelView      = new ButtonPanelView.ButtonPanelView();

            buttonPanelView.ViewModel = (buttonPanelViewModel);
            ButtonPanelView           = buttonPanelView;

            var customerRepository = Container.Resolve <ICustomerRepository>();
            var userRepository     = Container.Resolve <IUserRepository>();

            userRepository.Initialize();

            //var searchViewModel = new SearchView.SearchViewModel(customerRepository);
            //var searchView = new SearchView.SearchView();
            //searchView.ViewModel = (searchViewModel);

            //SearchView = searchView;

            var dialogService = Container.Resolve <IDialogService>();

            customerRepository.Initialize();
        }
コード例 #25
0
        void viewModel_SelectedAccountTypeChanged(object sender, System.EventArgs e)
        {
            var gridView = MainListView.View as GridView;
            var selector = sender as EntitySearchViewModel;

            if (selector != null && gridView != null)
            {
                gridView.Columns.Where(x => x.Header.ToString() != Localization.Properties.Resources.Name).ToList().ForEach(x => gridView.Columns.Remove(x));
                if (selector.SelectedEntityType != null)
                {
                    selector.SelectedEntityType.EntityCustomFields.Where(x => !x.Hidden).Select(CreateColumn).ToList().ForEach(x => gridView.Columns.Add(x));
                }
                MainListView.RaiseEvent(new RoutedEventArgs(LoadedEvent, MainListView));
            }
        }
コード例 #26
0
 private void ClearButton_Click(object sender, EventArgs e)
 {
     NumeroProcesso.Text          = "";
     AnoInicial.Text              = "";
     AnoFinal.Text                = "";
     DataEntrada.Text             = "";
     Requerente.Text              = "";
     FisicoList.SelectedIndex     = 0;
     InternoList.SelectedIndex    = 0;
     SetorList.SelectedIndex      = 0;
     AssuntoList.SelectedIndex    = 0;
     Complemento.Text             = "";
     MainListView.VirtualListSize = 0;
     MainListView.Invalidate();
 }
コード例 #27
0
 private void SearchStringPreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         e.Handled = true;
         ViewModel.SelectFullMatch();
     }
     else if (e.Key == Key.Down)
     {
         if (ViewModel.FoundEntities.Count > 0)
         {
             e.Handled = true;
             MainListView.Focus();
         }
     }
 }
コード例 #28
0
        public MainPage()
        {
            this.InitializeComponent();
            Initalize();
            NavigationCacheMode = NavigationCacheMode.Required;

            MainListView.Refresh  = RefreshMainList;
            MainListView.LoadMore = LoadMoreStories;

            Loaded += MainPage_Loaded;

            MyFav.Content          = StringUtil.GetString("Favorite");
            DownloadButton.Content = StringUtil.GetString("DownloadOffline");
            MainListView.SetRefresh(true);

            LLQNotifier.Default.Register(this);
        }
コード例 #29
0
 private void ClearButton_Click(object sender, EventArgs e)
 {
     Codigo.Text          = "";
     CNPJOption.Checked   = true;
     RazaoSocialText.Text = "";
     AtividadeText.Text   = "";
     AtividadeText.Tag    = "";
     LogradouroText.Text  = "";
     BairroText.Text      = "";
     BairroText.Tag       = "";
     NumeroText.Text      = "";
     MainListView.BeginUpdate();
     MainListView.VirtualListSize = 0;
     MainListView.EndUpdate();
     TotalEmpresa.Text = "0";
     SaveDatFile();
 }
コード例 #30
0
        private void FillListView()
        {
            int          i;
            ListViewItem item;

            MainListView.Items.Clear();
            for (i = 0; i < PluginRequestDataCounter; i++)
            {
                item = MainListView.Items.Add(string.Format("{0,6}", Convert.ToInt32(PluginRequestData[i].CommandNumber)));
                item.SubItems.Add(PluginRequestData[i].CommandName);
                item.SubItems.Add(PluginRequestData[i].Comments);
                item.Tag = i;

                //MainListView.Items[item.Index].SubItems.Add(PluginRequestData[i].CommandName);
                //MainListView.Items[item.Index].SubItems.Add(PluginRequestData[i].Comments);
            }
            MainListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
        }
コード例 #31
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="index">Index of category to edit</param>
 /// <param name="dataList">Datalist to work with</param>
 /// <param name="listView">Listview to display categories</param>
 /// <param name="rm">Resource manager</param>
 public EditExistingCategory(int index, FerdaSmartDataList dataList, MainListView listView, ResourceManager rm)
 {
     if (dataList.GetCategory(index).CatType == Ferda.FrontEnd.AddIns.EditCategories.CategoryType.Interval)
     {
         EditExistingInterval editedInterval = new EditExistingInterval(dataList, dataList.GetCategory(index), rm);
         listView.SuspendLayout();
         editedInterval.Name = "EditIntervalWizard";
         editedInterval.TabIndex = 2;
         editedInterval.Dock = DockStyle.Right;
         listView.splitContainer1.Panel2Collapsed = false;
         listView.splitContainer1.Panel2.Controls.Add(editedInterval);
         listView.MenuItemNew.Enabled = false;
         listView.ButtonNew.Enabled = false;
         listView.ButtonEdit.Enabled = false;
         listView.MenuItemEdit.Enabled = false;
         listView.DoubleClick -= new EventHandler(listView.EditItem);
         editedInterval.Disposed += new EventHandler(listView.ListViewReinitSize);
         listView.ResumeLayout();
         editedInterval.BringToFront();
     }
     else
     {
         EditExistingEnumeration editedEnum = new EditExistingEnumeration(dataList, dataList.GetCategory(index), rm);
         listView.SuspendLayout();
         editedEnum.Name = "EditSetWizard";
         editedEnum.TabIndex = 2;
         editedEnum.Dock = DockStyle.Right;
         listView.splitContainer1.Panel2Collapsed = false;
         listView.splitContainer1.Panel2.Controls.Add(editedEnum);
         listView.MenuItemNew.Enabled = false;
         listView.ButtonNew.Enabled = false;
         listView.ButtonEdit.Enabled = false;
         listView.MenuItemEdit.Enabled = false;
         editedEnum.Disposed += new EventHandler(listView.ListViewReinitSize);
         listView.ResumeLayout();
         editedEnum.BringToFront();
     }
 }