public void Load(BinaryReader reader)
        {
            MainWindow.itemsShares.Items.Clear();

            // Get count of scored shares
            int sharecount = reader.ReadInt32();

            for (int i = 0; i < sharecount; i++)
            {
                // Get Share Name
                string sharename = reader.ReadString();

                // Get scoring status
                bool isScored = reader.ReadBoolean();

                // Score if exists
                bool exists = reader.ReadBoolean();

                ControlShares control = new ControlShares();

                control.Share    = sharename;
                control.IsScored = isScored;
                control.Exists   = exists;

                MainWindow.itemsShares.Items.Add(control);
            }
        }
Пример #2
0
        private void btnAddShares_Click(object sender, RoutedEventArgs e)
        {
            ControlShares control = new ControlShares();

            itemsShares.Items.Add(control);
        }