コード例 #1
0
ファイル: Campaign.cs プロジェクト: manveti/DeCamp
 public Campaign(String name, String gm, String calendar, String ruleset)
 {
     this.name         = name;
     this.players      = new Dictionary <string, Player>();
     this.gm           = this.addPlayer(gm);
     this.calendarName = calendar;
     this.calendar     = Calendars.newCalendar(this.calendarName);
     this.rulesetName  = ruleset;
     this.ruleset      = Rulesets.newRuleset(this.rulesetName);
     this.now          = this.calendar.defaultTimestamp();
     this.state        = new CampaignState(this.now);
     this.timeline     = new SortedDictionary <Timestamp, List <Event> >();
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: manveti/DeCamp
        // File menu handlers
        public void newCampaign(object sender, RoutedEventArgs e)
        {
/////
//
            //prompt for existing unsaved campaign if necessary
//
/////
            QueryPrompt[] prompts =
            {
                new QueryPrompt("Campaign Name:", QueryType.STRING, "New Campaign"),
                new QueryPrompt("Calendar:",      QueryType.LIST,   Calendars.defaultCalendar,values: Calendars.getCalendars().ToArray()),
                new QueryPrompt("Rule Set:",      QueryType.LIST,   Rulesets.defaultRuleset,  values: Rulesets.getRulesets().ToArray())
            };
            object[] values = SimpleDialog.askCompound("New Campaign", prompts, this);
            if (values == null)
            {
                return;
            }
/////
//
            this.campaign = new Campaign((String)values[0], "me", (String)values[1], (String)values[2]);
//
/////
            this.showCampaign();
        }