Пример #1
0
    public static void Main(string[] args)
    {
        //Declare Monopoly instance
        string CurrentFP;

        Monopoly CurrGame = new Monopoly();

        CurrGame.NewPlayer("Dog", "Andrew")
        CurrGame.NewPlayer("Ship", "Fei")

        //Test
        Boardspace temp;

        temp = CurrGame.CurrBoard.GoSpace;
        Console.WriteLine("BEGIN TEST");
        do
        {
            Console.WriteLine(temp.SpaceName);
            Console.WriteLine(temp.SpaceType);
            Console.WriteLine(temp.GetType());
            temp = temp.Next;
            if (temp is TitleProperty)
            {
                Console.WriteLine(temp is TitleProperty);
                TitleProperty tempTitle = (TitleProperty)temp;
                Console.WriteLine(tempTitle.Rent);
            }
        }while (temp.SpaceName != CurrGame.CurrBoard.GoSpace.SpaceName);
    }
Пример #2
0
 static NestedArcChart()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(NestedArcChart), new FrameworkPropertyMetadata(typeof(NestedArcChart)));
     DataSorterProperty.OverrideMetadata(typeof(NestedArcChart),
                                         new FrameworkPropertyMetadata(new AscendingDataSorter()));
     TitleProperty.OverrideMetadata(typeof(NestedArcChart), new FrameworkPropertyMetadata("Nested Arc Chart"));
 }
Пример #3
0
        //=====================================================================

        /// <summary>
        /// This is overridden to allow cloning of a PDI object
        /// </summary>
        /// <returns>A clone of the object</returns>
        public override object Clone()
        {
            TitleProperty o = new TitleProperty();

            o.Clone(this);
            return(o);
        }
Пример #4
0
 static ParetoChart()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(ParetoChart), new FrameworkPropertyMetadata(typeof(ParetoChart)));
     //DataFilterProperty.OverrideMetadata(typeof (ParetoChart), new FrameworkPropertyMetadata(LiteralDataFilter.DialKCategoryFilter));
     DataSorterProperty.OverrideMetadata(typeof(ParetoChart), new FrameworkPropertyMetadata(new DescendingDataSorter()));
     TitleProperty.OverrideMetadata(typeof(ParetoChart), new FrameworkPropertyMetadata("Pareto Chart"));
 }
 static RightChromeWindow()
 {
     DefaultStyleKeyProperty.OverrideMetadata(
         typeof(RightChromeWindow),
         new FrameworkPropertyMetadata(typeof(RightChromeWindow)));
     TitleProperty.OverrideMetadata(
         typeof(RightChromeWindow),
         new FrameworkPropertyMetadata(nameof(RightChromeWindow)));
 }
Пример #6
0
        /// <summary>
        /// Initializes the <see cref="SessionView" /> class.
        /// </summary>
        static SessionView()
        {
            var propertyMetadata = new FrameworkPropertyMetadata(RESX.EmptySession)
            {
                CoerceValueCallback = OnCoerceTitleCallBack
            };

            TitleProperty.OverrideMetadata(typeof(SessionView), propertyMetadata);
        }
Пример #7
0
 /// <summary>
 /// コンストラクタ(2)
 /// </summary>
 /// <param name="id">int : ID</param>
 /// <param name="title">string : タイトル</param>
 /// <param name="author">string : 著者</param>
 /// <param name="publisher">string : 出版社</param>
 /// <param name="category">BookCategories : カテゴリー</param>
 /// <param name="price">decimal : 価格</param>
 /// <param name="purchaseDate">DateTime? : 購入日</param>
 /// <param name="reviewPoint">int : 評価点</param>
 public Book(int id, string title, string author, string publisher, BookCategories category, decimal price, DateTime?purchaseDate, int reviewPoint)
     : this()
 {
     IdProperty.Init(id);
     TitleProperty.Init(title);
     AuthorProperty.Init(author);
     PublisherProperty.Init(publisher);
     CategoryProperty.Init(category);
     PriceProperty.Init(price);
     PurchaseDateProperty.Init(purchaseDate);
     ReviewPointProperty.Init(reviewPoint);
 }
Пример #8
0
 /// <summary>
 /// コンストラクタ(3)
 /// </summary>
 /// <param name="book">Book</param>
 public Book(Book book)
     : this()
 {
     IdProperty.Init(book.Id);
     TitleProperty.Init(string.Format("*{0}", book.Title));
     AuthorProperty.Init(book.Author);
     PublisherProperty.Init(book.Publisher);
     CategoryProperty.Init(book.Category);
     PriceProperty.Init(book.Price);
     PurchaseDateProperty.Init(book.PurchaseDate);
     ReviewPointProperty.Init(book.ReviewPoint);
 }
Пример #9
0
        public MainWindow()
        {
            InitializeComponent();

            modNames      = new ArrayList();
            recentPresets = new ArrayList();

            titleProperty                 = new TitleProperty();
            titleBindingSource            = new BindingSource();
            titleBindingSource.DataSource = titleProperty;

            DataBindings.Add("text", titleBindingSource, "Title", false, DataSourceUpdateMode.OnPropertyChanged);

            generalTooltip.SetToolTip(CopyToClipboard, "Copy to clipboard");
            generalTooltip.SetToolTip(addModBtn, "Add mod to list");
            generalTooltip.SetToolTip(removeModBtn, "Remove selected mod from list");
        }
        public ModWrapper(object modObject)
        {
            ModObject = modObject;

            ModName      = (string)TitleProperty.GetValue(ModObject, null);
            ModDirectory = (string)ModDirectoryField.GetValue(ModObject);
            UnityVersion = (string)UnityVersionField.GetValue(ModObject);
            ModObjects   = (List <GameObject>)ModObjectsProperty.GetValue(ModObject, null);

            try
            {
                string modInfoText = File.ReadAllText(Path.Combine(ModDirectory, "modInfo.json"));
                if (modInfoText != null)
                {
                    Dictionary <string, object> modInfoDictionary = JsonConvert.DeserializeObject <Dictionary <string, object> >(modInfoText);
                    ModTitle = (string)modInfoDictionary["title"];
                    if (ModTitle == null)
                    {
                        ModTitle = ModName;
                    }

                    ModVersion = (string)modInfoDictionary["version"];
                }
                else
                {
                    ModTitle   = ModName;
                    ModVersion = null;
                }
            }
            catch (Exception ex)
            {
                ModTitle   = ModName;
                ModVersion = null;
            }

            _activeModObjects   = ModObjects;
            _inactiveModObjects = new List <GameObject>();

            Debug.LogFormat("[ModSelector] Found mod '{0}', which contains the following {1} mod object(s):", ModName, _activeModObjects.Count);
            foreach (GameObject gameObject in _activeModObjects)
            {
                Debug.LogFormat("  {0}", gameObject.name);
            }
            Debug.Log(" ");
        }
Пример #11
0
        /// <summary>
        /// This is overridden to allow copying of the additional properties
        /// </summary>
        /// <param name="p">The PDI object from which the settings are to be copied</param>
        protected override void Clone(PDIObject p)
        {
            VCard o = (VCard)p;

            this.ClearProperties();

            groupName = o.Group;

            fn     = (FormattedNameProperty)o.FormattedName.Clone();
            name   = (NameProperty)o.Name.Clone();
            title  = (TitleProperty)o.Title.Clone();
            role   = (RoleProperty)o.Role.Clone();
            mailer = (MailerProperty)o.Mailer.Clone();
            url    = (UrlProperty)o.Url.Clone();
            org    = (OrganizationProperty)o.Organization.Clone();
            uid    = (UniqueIdProperty)o.UniqueId.Clone();
            bday   = (BirthDateProperty)o.BirthDate.Clone();
            rev    = (LastRevisionProperty)o.LastRevision.Clone();
            tz     = (TimeZoneProperty)o.TimeZone.Clone();
            geo    = (GeographicPositionProperty)o.GeographicPosition.Clone();
            key    = (PublicKeyProperty)o.PublicKey.Clone();
            photo  = (PhotoProperty)o.Photo.Clone();
            logo   = (LogoProperty)o.Logo.Clone();
            sound  = (SoundProperty)o.Sound.Clone();

            this.Notes.CloneRange(o.Notes);
            this.Addresses.CloneRange(o.Addresses);
            this.Labels.CloneRange(o.Labels);
            this.Telephones.CloneRange(o.Telephones);
            this.EMailAddresses.CloneRange(o.EMailAddresses);
            this.Agents.CloneRange(o.Agents);
            this.CustomProperties.CloneRange(o.CustomProperties);

            addProfile     = o.AddProfile;
            mimeName       = (MimeNameProperty)o.MimeName.Clone();
            mimeSource     = (MimeSourceProperty)o.MimeSource.Clone();
            prodId         = (ProductIdProperty)o.ProductId.Clone();
            nickname       = (NicknameProperty)o.Nickname.Clone();
            sortString     = (SortStringProperty)o.SortString.Clone();
            classification = (ClassificationProperty)o.Classification.Clone();
            categories     = (CategoriesProperty)o.Categories.Clone();
        }
Пример #12
0
        /// <summary>
        /// The method can be called to clear all current property values from the vCard.  The version is left
        /// unchanged.
        /// </summary>
        public void ClearProperties()
        {
            groupName = null;

            fn     = null;
            name   = null;
            title  = null;
            role   = null;
            mailer = null;
            url    = null;
            org    = null;
            uid    = null;
            bday   = null;
            rev    = null;
            tz     = null;
            geo    = null;
            key    = null;
            photo  = null;
            logo   = null;
            sound  = null;

            notes       = null;
            addrs       = null;
            labels      = null;
            phones      = null;
            email       = null;
            agents      = null;
            customProps = null;

            addProfile     = false;
            mimeName       = null;
            mimeSource     = null;
            prodId         = null;
            nickname       = null;
            sortString     = null;
            classification = null;
            categories     = null;
        }
Пример #13
0
 get => (string)GetValue(TitleProperty); set { SetValue(TitleProperty, value); }
Пример #14
0
 set => base.SetValue(TitleProperty, value);
Пример #15
0
 static RingChart()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(RingChart), new FrameworkPropertyMetadata(typeof(RingChart)));
     TitleProperty.OverrideMetadata(typeof(RingChart), new FrameworkPropertyMetadata("Ring Chart"));
 }
Пример #16
0
    public void Board()
    {
        TitleProperty TempTitleProperty;
        Boardspace    temp;
        Boardspace    nexttemp = null;

        CurrBoard = new Board();

        //Set up double circular linked list of board spaces
        string BoardSpacesTblFP = System.String.Concat(this.FP, "/Raw Data/BoardSpacesTbl.csv");
        var    BoardSpacesTbl   = new StreamReader(@BoardSpacesTblFP);

        var        line     = BoardSpacesTbl.ReadLine();
        Boardspace prevtemp = new Boardspace();

        //Set up linked list of board spaces
        while (!BoardSpacesTbl.EndOfStream)
        {
            line = BoardSpacesTbl.ReadLine();
            var values = line.Split(',');


            temp = new Boardspace(values[0], values[1]);

            if (values[1] == "GO")
            {
                this.CurrBoard.GoSpace = temp;
            }
            else
            {
                temp.Previous = prevtemp;
                prevtemp.Next = temp;
            }


            prevtemp = temp;
            //Console.WriteLine(values[0]);
        }


        this.CurrBoard.GoSpace.Previous = prevtemp;
        prevtemp.Next = this.CurrBoard.GoSpace;


        BoardSpacesTbl = new StreamReader(@BoardSpacesTblFP);

        line = BoardSpacesTbl.ReadLine();



        temp = this.CurrBoard.GoSpace;

        do
        {
            if (temp.SpaceType == "GO")
            {
                this.CurrBoard.GoSpace = new GoSpace(ref temp);
            }
            if (temp.SpaceType == "Community Chest")
            {
                new CommunityChestCardSpace(temp);
            }
            if (temp.SpaceType == "Chance")
            {
                new ChanceCardSpace(temp);
            }
            if (temp.SpaceType == "Jail")
            {
                new Jail(temp);
            }
            if (temp.SpaceType == "Income Tax")
            {
                new IncomeTaxSpace(temp, this.Banker);
            }
            if (temp.SpaceType == "Luxury Tax")
            {
                new LuxuryTax(temp, this.Banker);
            }
            if (temp.SpaceType == "GO TO JAIL")
            {
                new GoToJail(temp);
            }
            temp = temp.Next;
        }while (temp.SpaceName != CurrBoard.GoSpace.SpaceName);



        string PropertyTblFP = System.String.Concat(this.FP, "/Raw Data/PropertyTbl.csv");
        var    PropertyTbl   = new StreamReader(@PropertyTblFP);

        Property TempProperty;

        temp = this.CurrBoard.GoSpace;
        line = PropertyTbl.ReadLine();



        //Set up property
        while (!PropertyTbl.EndOfStream)
        {
            line = PropertyTbl.ReadLine();
            //Console.WriteLine(line);
            var values = line.Split(',');


            string PropType = values[3];
            temp         = FindSpaceName(values[1]);
            TempProperty = new Property(Convert.ToInt64(values[2]), ref temp, this.Banker);

            //Find out if property is TitleProperty,Railroad or utility and create appropriate object
            if (PropType == "Title Property")
            {
                var values2 = ReturnPropertyData(values[1]);
                Console.WriteLine(values2[1]);
                TempTitleProperty = new TitleProperty(values2[1], Convert.ToInt64(values2[2]), Convert.ToInt64(values2[3]), Convert.ToInt64(values2[4]),
                                                      Convert.ToInt64(values2[5]), Convert.ToInt64(values2[6]), Convert.ToInt64(values2[7]), Convert.ToInt64(values2[8]),
                                                      Convert.ToInt64(values2[9]), Convert.ToInt64(values2[10]), Convert.ToInt64(values2[11]), Convert.ToInt64(values2[12]), ref TempProperty);
                Console.WriteLine(this.CurrBoard.GoSpace.Next.GetType());
                Console.WriteLine(TempTitleProperty.GetType());
            }
            if (PropType == "Railroad")
            {
                Railroad TempRail;
                TempRail = new Railroad(TempProperty);
            }
            if (PropType == "Utility")
            {
                Utility TempUtil;
                TempUtil = new Utility(TempProperty);
            }


            //Console.WriteLine(TempProperty.SpaceName);
        }
    }
Пример #17
0
 static LineGraph()
 {
     //DataFilterProperty.OverrideMetadata(typeof (LineGraph), new FrameworkPropertyMetadata(LiteralDataFilter.DialKCategoryFilter));
     DataSorterProperty.OverrideMetadata(typeof(LineGraph), new FrameworkPropertyMetadata(new DescendingDataSorter()));
     TitleProperty.OverrideMetadata(typeof(LineGraph), new FrameworkPropertyMetadata("Pareto Chart"));
 }
Пример #18
0
 static HorizontalBarChart()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(HorizontalBarChart), new FrameworkPropertyMetadata(typeof(HorizontalBarChart)));
     TitleProperty.OverrideMetadata(typeof(HorizontalBarChart), new FrameworkPropertyMetadata("Horizontal Bar Chart"));
 }
Пример #19
0
 set => this.SetValue(TitleProperty, value);
Пример #20
0
 set { SetValue(TitleProperty, value); }
Пример #21
0
 static BarChart()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(BarChart), new FrameworkPropertyMetadata(typeof(BarChart)));
     TitleProperty.OverrideMetadata(typeof(BarChart), new FrameworkPropertyMetadata("Stacked Bar Chart"));
 }
Пример #22
0
        //=====================================================================

        /// <summary>
        /// This is overridden to allow cloning of a PDI object
        /// </summary>
        /// <returns>A clone of the object</returns>
        public override object Clone()
        {
            TitleProperty o = new TitleProperty();
            o.Clone(this);
            return o;
        }
Пример #23
0
 set => SetValue(TitleProperty, value);
Пример #24
0
 static RingGauge()
 {
     TitleProperty.OverrideMetadata(typeof(RingGauge), new FrameworkPropertyMetadata("Ring Gauge"));
 }